tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.Measure.eq_rnDeriv
File: Mathlib/MeasureTheory/Decomposition/Lebesgue.lean

tactic: refine' ae_eq_of_forall_set_lintegral_eq_of_sigmaFinite hf (measurable_rnDeriv μ ν) _
state_before: α : Type u_1
β : Type ?u.60618
m : MeasurableSpace α
μ ν : Measure α
inst✝ : SigmaFinite ν
s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hs : s ⟂ₘ ν
hadd : μ = s + withDensity ν f
⊢ f =ᶠ[ae ν] rnDeriv μ ν

tactic: intro a ha _
state_before: α : Type u_1
β : Type ?u.60618
m : MeasurableSpace α
μ ν : Measure α
inst✝ : SigmaFinite ν
s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hs : s ⟂ₘ ν
hadd : μ = s + withDensity ν f
⊢ ∀ (s : Set α), MeasurableSet s → ↑↑ν s < ⊤ → (∫⁻ (x : α) in s, f x ∂ν) = ∫⁻ (x : α) in s, rnDeriv μ ν x ∂ν

tactic: calc
  (∫⁻ x : α in a, f x ∂ν) = ν.withDensity f a := (withDensity_apply f ha).symm
  _ = ν.withDensity (μ.rnDeriv ν) a := by rw [eq_withDensity_rnDeriv hf hs hadd]
  _ = ∫⁻ x : α in a, μ.rnDeriv ν x ∂ν := withDensity_apply _ ha
state_before: α : Type u_1
β : Type ?u.60618
m : MeasurableSpace α
μ ν : Measure α
inst✝ : SigmaFinite ν
s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hs : s ⟂ₘ ν
hadd : μ = s + withDensity ν f
a : Set α
ha : MeasurableSet a
a✝ : ↑↑ν a < ⊤
⊢ (∫⁻ (x : α) in a, f x ∂ν) = ∫⁻ (x : α) in a, rnDeriv μ ν x ∂ν

tactic: rw [eq_withDensity_rnDeriv hf hs hadd]
state_before: α : Type u_1
β : Type ?u.60618
m : MeasurableSpace α
μ ν : Measure α
inst✝ : SigmaFinite ν
s : Measure α
f : α → ℝ≥0∞
hf : Measurable f
hs : s ⟂ₘ ν
hadd : μ = s + withDensity ν f
a : Set α
ha : MeasurableSet a
a✝ : ↑↑ν a < ⊤
⊢ ↑↑(withDensity ν f) a = ↑↑(withDensity ν (rnDeriv μ ν)) a
Theorem: AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot_symm_mk_mk
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [quotAdjoinRootEquivQuotPolynomialQuot, RingEquiv.symm_trans_apply,
  RingEquiv.symm_trans_apply, RingEquiv.symm_trans_apply, RingEquiv.symm_symm,
  Polynomial.quotQuotEquivComm_mk, Ideal.quotEquivOfEq_symm, Ideal.quotEquivOfEq_mk, ←
  RingHom.comp_apply, ← DoubleQuot.quotQuotMk,
  quotMapCMapSpanMkEquivQuotMapCQuotMapSpanMk_symm_quotQuotMk,
  quotMapOfEquivQuotMapCMapSpanMk_symm_mk]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I : Ideal R
f p : R[X]
⊢ ↑(RingEquiv.symm (quotAdjoinRootEquivQuotPolynomialQuot I f))
      (↑(Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (Polynomial.map (Ideal.Quotient.mk I) p)) =
    ↑(Ideal.Quotient.mk (Ideal.map (of f) I)) (↑(mk f) p)
Theorem: padicNorm.nat_eq_one_iff
File: Mathlib/NumberTheory/Padics/PadicNorm.lean

tactic: rw [← Int.coe_nat_dvd, ← int_eq_one_iff, Int.cast_ofNat]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
m : ℕ
⊢ padicNorm p ↑m = 1 ↔ ¬p ∣ m
Theorem: Filter.coprod_neBot_iff
File: Mathlib/Order/Filter/Prod.lean

tactic: simp [Filter.coprod]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.60908
δ : Type ?u.60911
ι : Sort ?u.60914
f : Filter α
g : Filter β
⊢ NeBot (Filter.coprod f g) ↔ NeBot f ∧ Nonempty β ∨ Nonempty α ∧ NeBot g
Theorem: add_tsub_eq_max
File: Mathlib/Algebra/Order/Sub/Canonical.lean

tactic: rw [add_comm, max_comm, tsub_add_eq_max]
state_before: α : Type u_1
inst✝² : CanonicallyLinearOrderedAddMonoid α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
⊢ a + (b - a) = max a b
Theorem: AlgebraicIndependent.coe_range
File: Mathlib/RingTheory/AlgebraicIndependent.lean

tactic: simpa using hx.comp _ (rangeSplitting_injective x)
state_before: ι : Type u_3
ι' : Type ?u.208082
R : Type u_2
K : Type ?u.208088
A : Type u_1
A' : Type ?u.208094
A'' : Type ?u.208097
V : Type u
V' : Type ?u.208102
x : ι → A
inst✝⁶ : CommRing R
inst✝⁵ : CommRing A
inst✝⁴ : CommRing A'
inst✝³ : CommRing A''
inst✝² : Algebra R A
inst✝¹ : Algebra R A'
inst✝ : Algebra R A''
a b : R
hx : AlgebraicIndependent R x
⊢ AlgebraicIndependent R Subtype.val
Theorem: LucasLehmer.X.card_units_lt
File: Mathlib/NumberTheory/LucasLehmer.lean

tactic: have : Fact (1 < (q : ℕ)) := ⟨w⟩
state_before: q : ℕ+
w : 1 < q
⊢ Fintype.card (X q)ˣ < ↑q ^ 2

tactic: convert card_units_lt (X q)
state_before: q : ℕ+
w : 1 < q
this : Fact (1 < ↑q)
⊢ Fintype.card (X q)ˣ < ↑q ^ 2

tactic: rw [card_eq]
state_before: case h.e'_4
q : ℕ+
w : 1 < q
this : Fact (1 < ↑q)
⊢ ↑q ^ 2 = Fintype.card (X q)
Theorem: Matrix.cons_vecAlt0
File: Mathlib/Data/Fin/VecNotation.lean

tactic: rwa [add_assoc n, add_comm 1, ← add_assoc, ← add_assoc, add_right_cancel_iff,
  add_right_cancel_iff] at h
state_before: α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
⊢ m = n + n

tactic: ext i
state_before: α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
⊢ vecAlt0 h (vecCons x (vecCons y u)) = vecCons x (vecAlt0 (_ : m = n + n) u)

tactic: simp_rw [vecAlt0]
state_before: case h
α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : Fin (n + 1)
⊢ vecAlt0 h (vecCons x (vecCons y u)) i = vecCons x (vecAlt0 (_ : m = n + n) u) i

tactic: rcases i with ⟨⟨⟩ | i, hi⟩
state_before: case h
α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : Fin (n + 1)
⊢ vecCons x (vecCons y u) { val := ↑i + ↑i, isLt := (_ : ↑i + ↑i < m + 1 + 1) } =
    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) i

tactic: rfl
state_before: case h.mk.zero
α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
hi : Nat.zero < n + 1
⊢ vecCons x (vecCons y u)
      { val := ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi },
        isLt := (_ : ↑{ val := Nat.zero, isLt := hi } + ↑{ val := Nat.zero, isLt := hi } < m + 1 + 1) } =
    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) { val := Nat.zero, isLt := hi }

tactic: simp [vecAlt0, Nat.add_succ, Nat.succ_add]
state_before: case h.mk.succ
α : Type u
m n o : ℕ
m' : Type ?u.50198
n' : Type ?u.50201
o' : Type ?u.50204
h : m + 1 + 1 = n + 1 + (n + 1)
x y : α
u : Fin m → α
i : ℕ
hi : Nat.succ i < n + 1
⊢ vecCons x (vecCons y u)
      { val := ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi },
        isLt := (_ : ↑{ val := Nat.succ i, isLt := hi } + ↑{ val := Nat.succ i, isLt := hi } < m + 1 + 1) } =
    vecCons x (fun k => u { val := ↑k + ↑k, isLt := (_ : ↑k + ↑k < m) }) { val := Nat.succ i, isLt := hi }
Theorem: CategoryTheory.Preadditive.exact_iff_exact_of_iso
File: Mathlib/Algebra/Homology/Exact.lean

tactic: rw [← cancel_mono α.hom.right]
state_before: V : Type u
inst✝⁵ : Category V
inst✝⁴ : HasImages V
inst✝³ : HasZeroObject V
inst✝² : Preadditive V
inst✝¹ : HasKernels V
inst✝ : HasCokernels V
A₁ B₁ C₁ A₂ B₂ C₂ : V
f₁ : A₁ ⟶ B₁
g₁ : B₁ ⟶ C₁
f₂ : A₂ ⟶ B₂
g₂ : B₂ ⟶ C₂
α : Arrow.mk f₁ ≅ Arrow.mk f₂
β : Arrow.mk g₁ ≅ Arrow.mk g₂
p : α.hom.right = β.hom.left
⊢ α.symm.hom.right = β.symm.hom.left

tactic: simp only [Iso.symm_hom, ← Arrow.comp_right, α.inv_hom_id]
state_before: V : Type u
inst✝⁵ : Category V
inst✝⁴ : HasImages V
inst✝³ : HasZeroObject V
inst✝² : Preadditive V
inst✝¹ : HasKernels V
inst✝ : HasCokernels V
A₁ B₁ C₁ A₂ B₂ C₂ : V
f₁ : A₁ ⟶ B₁
g₁ : B₁ ⟶ C₁
f₂ : A₂ ⟶ B₂
g₂ : B₂ ⟶ C₂
α : Arrow.mk f₁ ≅ Arrow.mk f₂
β : Arrow.mk g₁ ≅ Arrow.mk g₂
p : α.hom.right = β.hom.left
⊢ α.symm.hom.right ≫ α.hom.right = β.symm.hom.left ≫ α.hom.right

tactic: simp only [p, ← Arrow.comp_left, Arrow.id_right, Arrow.id_left, Iso.inv_hom_id]
state_before: V : Type u
inst✝⁵ : Category V
inst✝⁴ : HasImages V
inst✝³ : HasZeroObject V
inst✝² : Preadditive V
inst✝¹ : HasKernels V
inst✝ : HasCokernels V
A₁ B₁ C₁ A₂ B₂ C₂ : V
f₁ : A₁ ⟶ B₁
g₁ : B₁ ⟶ C₁
f₂ : A₂ ⟶ B₂
g₂ : B₂ ⟶ C₂
α : Arrow.mk f₁ ≅ Arrow.mk f₂
β : Arrow.mk g₁ ≅ Arrow.mk g₂
p : α.hom.right = β.hom.left
⊢ (𝟙 (Arrow.mk f₂)).right = β.inv.left ≫ α.hom.right

tactic: rfl
state_before: V : Type u
inst✝⁵ : Category V
inst✝⁴ : HasImages V
inst✝³ : HasZeroObject V
inst✝² : Preadditive V
inst✝¹ : HasKernels V
inst✝ : HasCokernels V
A₁ B₁ C₁ A₂ B₂ C₂ : V
f₁ : A₁ ⟶ B₁
g₁ : B₁ ⟶ C₁
f₂ : A₂ ⟶ B₂
g₂ : B₂ ⟶ C₂
α : Arrow.mk f₁ ≅ Arrow.mk f₂
β : Arrow.mk g₁ ≅ Arrow.mk g₂
p : α.hom.right = β.hom.left
⊢ 𝟙 (Arrow.mk f₂).right = 𝟙 (Arrow.mk g₂).left
Theorem: Basis.nonempty_fintype_index_of_rank_lt_aleph0
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: rwa [← Cardinal.lift_lt, ← b.mk_eq_rank, Cardinal.lift_aleph0, Cardinal.lift_lt_aleph0,
  Cardinal.lt_aleph0_iff_fintype] at h
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι✝ : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.413475
R : Type u
inst✝³ : Ring R
inst✝² : StrongRankCondition R
M : Type v
inst✝¹ : AddCommGroup M
inst✝ : Module R M
ι : Type u_1
b : Basis ι R M
h : Module.rank R M < ℵ₀
⊢ Nonempty (Fintype ι)
Theorem: nhdsWithin_Ioi_neBot'
File: Mathlib/Topology/Order/Basic.lean

tactic: rwa [closure_Ioi' H₁]
state_before: α : Type u
β : Type v
γ : Type w
inst✝³ : TopologicalSpace α
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : DenselyOrdered α
a✝ b✝ : α
s : Set α
a b : α
H₁ : Set.Nonempty (Ioi a)
H₂ : a ≤ b
⊢ b ∈ closure (Ioi a)
Theorem: Matrix.det_one
File: Mathlib/LinearAlgebra/Matrix/Determinant.lean

tactic: rw [← diagonal_one]
state_before: m : Type ?u.167139
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
⊢ det 1 = 1

tactic: simp [-diagonal_one]
state_before: m : Type ?u.167139
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
⊢ det (diagonal fun x => 1) = 1
Theorem: AddLECancellable.mul_tsub
File: Mathlib/Algebra/Order/Ring/Canonical.lean

tactic: rw [tsub_eq_zero_iff_le.2 hbc, mul_zero, tsub_eq_zero_iff_le.2 (mul_le_mul_left' hbc a)]
state_before: case inl
α : Type u
β : Type ?u.23190
inst✝³ : CanonicallyOrderedCommSemiring α
a b c : α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : IsTotal α fun x x_1 => x ≤ x_1
h : AddLECancellable (a * c)
hbc : b ≤ c
⊢ a * (b - c) = a * b - a * c

tactic: apply h.eq_tsub_of_add_eq
state_before: case inr
α : Type u
β : Type ?u.23190
inst✝³ : CanonicallyOrderedCommSemiring α
a b c : α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : IsTotal α fun x x_1 => x ≤ x_1
h : AddLECancellable (a * c)
hcb : c ≤ b
⊢ a * (b - c) = a * b - a * c

tactic: rw [← mul_add, tsub_add_cancel_of_le hcb]
state_before: case inr
α : Type u
β : Type ?u.23190
inst✝³ : CanonicallyOrderedCommSemiring α
a b c : α
inst✝² : Sub α
inst✝¹ : OrderedSub α
inst✝ : IsTotal α fun x x_1 => x ≤ x_1
h : AddLECancellable (a * c)
hcb : c ≤ b
⊢ a * (b - c) + a * c = a * b
Theorem: isometry_subsingleton
File: Mathlib/Topology/MetricSpace/Isometry.lean

tactic: rw [Subsingleton.elim x y]
state_before: ι : Type ?u.1994
α : Type u
β : Type v
γ : Type w
inst✝³ : PseudoEMetricSpace α
inst✝² : PseudoEMetricSpace β
inst✝¹ : PseudoEMetricSpace γ
f : α → β
x✝ y✝ z : α
s : Set α
inst✝ : Subsingleton α
x y : α
⊢ edist (f x) (f y) = edist x y

tactic: simp
state_before: ι : Type ?u.1994
α : Type u
β : Type v
γ : Type w
inst✝³ : PseudoEMetricSpace α
inst✝² : PseudoEMetricSpace β
inst✝¹ : PseudoEMetricSpace γ
f : α → β
x✝ y✝ z : α
s : Set α
inst✝ : Subsingleton α
x y : α
⊢ edist (f y) (f y) = edist y y
Theorem: Finsupp.neLocus_neg
File: Mathlib/Data/Finsupp/NeLocus.lean

tactic: rw [← neLocus_neg_neg, neg_neg]
state_before: α : Type u_1
M : Type ?u.23059
N : Type u_2
P : Type ?u.23065
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : AddGroup N
f f₁ f₂ g g₁ g₂ : α →₀ N
⊢ neLocus (-f) g = neLocus f (-g)
Theorem: MeasurableSet.union
File: Mathlib/MeasureTheory/MeasurableSpaceDef.lean

tactic: rw [union_eq_iUnion]
state_before: α : Type u_1
β : Type ?u.8432
γ : Type ?u.8435
δ : Type ?u.8438
δ' : Type ?u.8441
ι : Sort ?u.8444
s t u : Set α
m : MeasurableSpace α
s₁ s₂ : Set α
h₁ : MeasurableSet s₁
h₂ : MeasurableSet s₂
⊢ MeasurableSet (s₁ ∪ s₂)

tactic: exact .iUnion (Bool.forall_bool.2 ⟨h₂, h₁⟩)
state_before: α : Type u_1
β : Type ?u.8432
γ : Type ?u.8435
δ : Type ?u.8438
δ' : Type ?u.8441
ι : Sort ?u.8444
s t u : Set α
m : MeasurableSpace α
s₁ s₂ : Set α
h₁ : MeasurableSet s₁
h₂ : MeasurableSet s₂
⊢ MeasurableSet (⋃ (b : Bool), bif b then s₁ else s₂)
Theorem: LocalEquiv.mem_symm_trans_source
File: Mathlib/Logic/Equiv/LocalEquiv.lean

tactic: rwa [mem_preimage, LocalEquiv.symm_symm, e.left_inv he]
state_before: α : Type u_1
β : Type u_3
γ : Type u_2
δ : Type ?u.49747
e : LocalEquiv α β
e'✝ : LocalEquiv β γ
e' : LocalEquiv α γ
x : α
he : x ∈ e.source
he' : x ∈ e'.source
⊢ ↑e x ∈ ↑(LocalEquiv.symm (LocalEquiv.symm (LocalEquiv.symm e))) ⁻¹' e'.source
Theorem: Fin.cycleRange_symm_succ
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: simp
state_before: n : ℕ
i : Fin (n + 1)
j : Fin n
⊢ ↑(cycleRange i) (↑(cycleRange i).symm (succ j)) = ↑(cycleRange i) (↑(succAbove i) j)
Theorem: Set.Finite.toFinset_ssubset_toFinset
File: Mathlib/Data/Set/Finite.lean

tactic: simp only [← Finset.coe_ssubset, Finite.coe_toFinset]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
a : α
hs : Set.Finite s
ht : Set.Finite t
⊢ Finite.toFinset hs ⊂ Finite.toFinset ht ↔ s ⊂ t
Theorem: Int.sub_eq_zero_of_eq
File: Std/Data/Int/Lemmas.lean

tactic: rw [h, Int.sub_self]
state_before: a b : Int
h : a = b
⊢ a - b = 0
Theorem: HasDerivWithinAt.div_const
File: Mathlib/Analysis/Calculus/Deriv/Mul.lean

tactic: simpa only [div_eq_mul_inv] using hc.mul_const d⁻¹
state_before: 𝕜 : Type u
inst✝⁶ : NontriviallyNormedField 𝕜
F : Type v
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
E : Type w
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
𝕜' : Type u_1
inst✝¹ : NontriviallyNormedField 𝕜'
inst✝ : NormedAlgebra 𝕜 𝕜'
c d✝ : 𝕜 → 𝕜'
c' d' : 𝕜'
hc : HasDerivWithinAt c c' s x
d : 𝕜'
⊢ HasDerivWithinAt (fun x => c x / d) (c' / d) s x
Theorem: covby_sup_of_inf_covby_right
File: Mathlib/Order/ModularLattice.lean

tactic: rw [sup_comm, inf_comm]
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : IsUpperModularLattice α
a b : α
⊢ a ⊓ b ⋖ b → a ⋖ a ⊔ b

tactic: exact covby_sup_of_inf_covby_left
state_before: α : Type u_1
inst✝¹ : Lattice α
inst✝ : IsUpperModularLattice α
a b : α
⊢ b ⊓ a ⋖ b → a ⋖ b ⊔ a
Theorem: Rat.inv_def
File: Std/Data/Rat/Lemmas.lean

tactic: unfold Rat.inv
state_before: a : Rat
⊢ Rat.inv a = ↑a.den /. a.num

tactic: split
state_before: a : Rat
⊢ (if h : a.num < 0 then mk' (-↑a.den) (Int.natAbs a.num)
    else if h : a.num > 0 then mk' (↑a.den) (Int.natAbs a.num) else a) =
    ↑a.den /. a.num

tactic: split
state_before: case inr
a : Rat
h✝ : ¬a.num < 0
⊢ (if h : a.num > 0 then mk' (↑a.den) (Int.natAbs a.num) else a) = ↑a.den /. a.num

tactic: next h => rw [mk_eq_divInt, ← Int.natAbs_neg,
  Int.natAbs_of_nonneg (Int.le_of_lt <| Int.neg_pos_of_neg h), neg_divInt_neg]
state_before: case inl
a : Rat
h✝ : a.num < 0
⊢ mk' (-↑a.den) (Int.natAbs a.num) = ↑a.den /. a.num

tactic: rw [mk_eq_divInt, ← Int.natAbs_neg,
Int.natAbs_of_nonneg (Int.le_of_lt <| Int.neg_pos_of_neg h), neg_divInt_neg]
state_before: a : Rat
h : a.num < 0
⊢ mk' (-↑a.den) (Int.natAbs a.num) = ↑a.den /. a.num

tactic: next h => rw [mk_eq_divInt, Int.natAbs_of_nonneg (Int.le_of_lt h)]
state_before: case inr.inl
a : Rat
h✝¹ : ¬a.num < 0
h✝ : a.num > 0
⊢ mk' (↑a.den) (Int.natAbs a.num) = ↑a.den /. a.num

tactic: rw [mk_eq_divInt, Int.natAbs_of_nonneg (Int.le_of_lt h)]
state_before: a : Rat
h✝ : ¬a.num < 0
h : a.num > 0
⊢ mk' (↑a.den) (Int.natAbs a.num) = ↑a.den /. a.num

tactic: next h₁ h₂ =>
apply (divInt_self _).symm.trans
simp [Int.le_antisymm (Int.not_lt.1 h₂) (Int.not_lt.1 h₁)]
state_before: case inr.inr
a : Rat
h✝¹ : ¬a.num < 0
h✝ : ¬a.num > 0
⊢ a = ↑a.den /. a.num

tactic: apply (divInt_self _).symm.trans
state_before: a : Rat
h₁ : ¬a.num < 0
h₂ : ¬a.num > 0
⊢ a = ↑a.den /. a.num

tactic: simp [Int.le_antisymm (Int.not_lt.1 h₂) (Int.not_lt.1 h₁)]
state_before: a : Rat
h₁ : ¬a.num < 0
h₂ : ¬a.num > 0
⊢ a.num /. ↑a.den = ↑a.den /. a.num
Theorem: Set.enumerate_mem
File: Mathlib/Data/Set/Enumerate.lean

tactic: cases h : sel s
state_before: α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a : α
⊢ enumerate sel s (n + 1) = some a → a ∈ s

tactic: case none => simp [enumerate_eq_none_of_sel, h]
state_before: case none
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a : α
h : sel s = none
⊢ enumerate sel s (n + 1) = some a → a ∈ s

case some
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a val✝ : α
h : sel s = some val✝
⊢ enumerate sel s (n + 1) = some a → a ∈ s

tactic: case some a' =>
  simp [enumerate, h]
  exact fun h' : enumerate sel (s \ {a'}) n = some a ↦
    have : a ∈ s \ {a'} := enumerate_mem h_sel h'
    this.left
state_before: case some
α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a val✝ : α
h : sel s = some val✝
⊢ enumerate sel s (n + 1) = some a → a ∈ s

tactic: simp [enumerate_eq_none_of_sel, h]
state_before: α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a : α
h : sel s = none
⊢ enumerate sel s (n + 1) = some a → a ∈ s

tactic: simp [enumerate, h]
state_before: α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a a' : α
h : sel s = some a'
⊢ enumerate sel s (n + 1) = some a → a ∈ s

tactic: exact fun h' : enumerate sel (s \ {a'}) n = some a ↦
  have : a ∈ s \ {a'} := enumerate_mem h_sel h'
  this.left
state_before: α : Type u_1
sel : Set α → Option α
h_sel : ∀ (s : Set α) (a : α), sel s = some a → a ∈ s
s : Set α
n : ℕ
a a' : α
h : sel s = some a'
⊢ (do
        let a ← some a'
        enumerate sel (s \ {a}) n) =
      some a →
    a ∈ s
Theorem: SimpleGraph.IsSRGWith.card_neighborFinset_union_of_adj
File: Mathlib/Combinatorics/SimpleGraph/StronglyRegular.lean

tactic: rw [← h.of_adj v w ha]
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
v w : V
h : IsSRGWith G n k ℓ μ
ha : Adj G v w
⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - ℓ

tactic: apply h.card_neighborFinset_union_eq
state_before: V : Type u
inst✝² : Fintype V
inst✝¹ : DecidableEq V
G : SimpleGraph V
inst✝ : DecidableRel G.Adj
n k ℓ μ : ℕ
v w : V
h : IsSRGWith G n k ℓ μ
ha : Adj G v w
⊢ Finset.card (neighborFinset G v ∪ neighborFinset G w) = 2 * k - Fintype.card ↑(commonNeighbors G v w)
Theorem: upperCentralSeries_one
File: Mathlib/GroupTheory/Nilpotent.lean

tactic: ext
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
⊢ upperCentralSeries G 1 = center G

tactic: simp only [upperCentralSeries, upperCentralSeriesAux, upperCentralSeriesStep, center, Set.center,
  mem_mk, mem_bot, Set.mem_setOf_eq]
state_before: case h
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
x✝ : G
⊢ x✝ ∈ upperCentralSeries G 1 ↔ x✝ ∈ center G

tactic: exact forall_congr' fun y => by rw [mul_inv_eq_one, mul_inv_eq_iff_eq_mul, eq_comm]
state_before: case h
G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
x✝ : G
⊢ (∀ (y : G), x✝ * y * x✝⁻¹ * y⁻¹ = 1) ↔ ∀ (m : G), m * x✝ = x✝ * m

tactic: rw [mul_inv_eq_one, mul_inv_eq_iff_eq_mul, eq_comm]
state_before: G : Type u_1
inst✝¹ : Group G
H : Subgroup G
inst✝ : Normal H
x✝ y : G
⊢ x✝ * y * x✝⁻¹ * y⁻¹ = 1 ↔ y * x✝ = x✝ * y
Theorem: Monotone.ne_of_lt_of_lt_int
File: Mathlib/Order/Monotone/Basic.lean

tactic: rintro rfl
state_before: ι : Type ?u.45732
α : Type u
β : Type v
γ : Type w
δ : Type ?u.45741
π : ι → Type ?u.45746
r : α → α → Prop
inst✝ : Preorder α
f : ℤ → α
hf : Monotone f
n : ℤ
x : α
h1 : f n < x
h2 : x < f (n + 1)
a : ℤ
⊢ f a ≠ x

tactic: exact (hf.reflect_lt h1).not_le (Int.le_of_lt_add_one <| hf.reflect_lt h2)
state_before: ι : Type ?u.45732
α : Type u
β : Type v
γ : Type w
δ : Type ?u.45741
π : ι → Type ?u.45746
r : α → α → Prop
inst✝ : Preorder α
f : ℤ → α
hf : Monotone f
n a : ℤ
h1 : f n < f a
h2 : f a < f (n + 1)
⊢ False
Theorem: nndist_le_pi_nndist
File: Mathlib/Topology/MetricSpace/Basic.lean

tactic: rw [← ENNReal.coe_le_coe, ← edist_nndist, ← edist_nndist]
state_before: α : Type u
β : Type v
X : Type ?u.397955
ι : Type ?u.397958
inst✝² : PseudoMetricSpace α
π : β → Type u_1
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
b : β
⊢ nndist (f b) (g b) ≤ nndist f g

tactic: exact edist_le_pi_edist f g b
state_before: α : Type u
β : Type v
X : Type ?u.397955
ι : Type ?u.397958
inst✝² : PseudoMetricSpace α
π : β → Type u_1
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
b : β
⊢ edist (f b) (g b) ≤ edist f g
Theorem: Num.lt_to_nat
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp at h
state_before: α : Type ?u.232833
m n : Num
h : Ordering.casesOn Ordering.lt (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.lt = Ordering.lt

tactic: simp [h]
state_before: α : Type ?u.232833
m n : Num
h : ↑m < ↑n
⊢ ↑m < ↑n ↔ Ordering.lt = Ordering.lt

tactic: simp at h
state_before: α : Type ?u.232833
m n : Num
h : Ordering.casesOn Ordering.eq (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.eq = Ordering.lt

tactic: simp [h, lt_irrefl]
state_before: α : Type ?u.232833
m n : Num
h : m = n
⊢ ↑m < ↑n ↔ Ordering.eq = Ordering.lt

tactic: simp [not_lt_of_gt h]
state_before: α : Type ?u.232833
m n : Num
h : Ordering.casesOn Ordering.gt (↑m < ↑n) (m = n) (↑n < ↑m)
⊢ ↑m < ↑n ↔ Ordering.gt = Ordering.lt
Theorem: Ordinal.typein_one_out
File: Mathlib/SetTheory/Ordinal/Basic.lean

tactic: rw [one_out_eq x, typein_enum]
state_before: α : Type ?u.187136
β : Type ?u.187139
γ : Type ?u.187142
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
x : (Quotient.out 1).α
⊢ typein (fun x x_1 => x < x_1) x = 0
Theorem: LatticeOrderedCommGroup.pos_eq_self_of_one_lt_pos
File: Mathlib/Algebra/Order/LatticeGroup.lean

tactic: rw [m_pos_part_def, right_lt_sup, not_le] at hx
state_before: α✝ : Type u
inst✝³ : Lattice α✝
inst✝² : CommGroup α✝
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : CommGroup α
x : α
hx : 1 < x⁺
⊢ x⁺ = x

tactic: rw [m_pos_part_def, sup_eq_left]
state_before: α✝ : Type u
inst✝³ : Lattice α✝
inst✝² : CommGroup α✝
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : CommGroup α
x : α
hx : 1 < x
⊢ x⁺ = x

tactic: exact hx.le
state_before: α✝ : Type u
inst✝³ : Lattice α✝
inst✝² : CommGroup α✝
α : Type u_1
inst✝¹ : LinearOrder α
inst✝ : CommGroup α
x : α
hx : 1 < x
⊢ 1 ≤ x