tasksource/leandojo huggingface dataset:
Theorem: Set.Nontrivial.einfsep_exists_of_finite
File: Mathlib/Topology/MetricSpace/Infsep.lean

tactic: classical
  cases nonempty_fintype s
  simp_rw [einfsep_of_fintype]
  rcases@Finset.exists_mem_eq_inf _ _ _ _ s.offDiag.toFinset (by simpa) (uncurry edist) with
    ⟨w, hxy, hed⟩
  simp_rw [mem_toFinset] at hxy
  refine' ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩
state_before: α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y

tactic: cases nonempty_fintype s
state_before: α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y

tactic: simp_rw [einfsep_of_fintype]
state_before: case intro
α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
val✝ : Fintype ↑s
⊢ ∃ x x_1 y x_2 _hxy, einfsep s = edist x y

tactic: rcases@Finset.exists_mem_eq_inf _ _ _ _ s.offDiag.toFinset (by simpa) (uncurry edist) with
  ⟨w, hxy, hed⟩
state_before: case intro
α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
val✝ : Fintype ↑s
⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y

tactic: simp_rw [mem_toFinset] at hxy
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
val✝ : Fintype ↑s
w : α × α
hxy : w ∈ toFinset (offDiag s)
hed : Finset.inf (toFinset (offDiag s)) (uncurry edist) = uncurry edist w
⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y

tactic: refine' ⟨w.fst, hxy.1, w.snd, hxy.2.1, hxy.2.2, hed⟩
state_before: case intro.intro.intro
α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
val✝ : Fintype ↑s
w : α × α
hed : Finset.inf (toFinset (offDiag s)) (uncurry edist) = uncurry edist w
hxy : w ∈ offDiag s
⊢ ∃ x h y h h, Finset.inf (toFinset (offDiag s)) (uncurry edist) = edist x y

tactic: simpa
state_before: α : Type u_1
β : Type ?u.36701
inst✝¹ : EDist α
x y : α
s t : Set α
inst✝ : Finite ↑s
hs : Set.Nontrivial s
val✝ : Fintype ↑s
⊢ Finset.Nonempty (toFinset (offDiag s))
Theorem: RingSubgroupsBasis.of_comm
File: Mathlib/Topology/Algebra/Nonarchimedean/Bases.lean

tactic: intro x i
state_before: A✝ : Type ?u.910
ι✝ : Type ?u.913
inst✝¹ : Ring A✝
A : Type u_1
ι : Type u_2
inst✝ : CommRing A
B : ι → AddSubgroup A
inter : ∀ (i j : ι), ∃ k, B k ≤ B i ⊓ B j
mul : ∀ (i : ι), ∃ j, ↑(B j) * ↑(B j) ⊆ ↑(B i)
leftMul : ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
⊢ ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(B i)

tactic: cases' leftMul x i with j hj
state_before: A✝ : Type ?u.910
ι✝ : Type ?u.913
inst✝¹ : Ring A✝
A : Type u_1
ι : Type u_2
inst✝ : CommRing A
B : ι → AddSubgroup A
inter : ∀ (i j : ι), ∃ k, B k ≤ B i ⊓ B j
mul : ∀ (i : ι), ∃ j, ↑(B j) * ↑(B j) ⊆ ↑(B i)
leftMul : ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
x : A
i : ι
⊢ ∃ j, ↑(B j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(B i)

tactic: use j
state_before: case intro
A✝ : Type ?u.910
ι✝ : Type ?u.913
inst✝¹ : Ring A✝
A : Type u_1
ι : Type u_2
inst✝ : CommRing A
B : ι → AddSubgroup A
inter : ∀ (i j : ι), ∃ k, B k ≤ B i ⊓ B j
mul : ∀ (i : ι), ∃ j, ↑(B j) * ↑(B j) ⊆ ↑(B i)
leftMul : ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
x : A
i j : ι
hj : ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
⊢ ∃ j, ↑(B j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(B i)

tactic: simpa [mul_comm] using hj
state_before: case intro
A✝ : Type ?u.910
ι✝ : Type ?u.913
inst✝¹ : Ring A✝
A : Type u_1
ι : Type u_2
inst✝ : CommRing A
B : ι → AddSubgroup A
inter : ∀ (i j : ι), ∃ k, B k ≤ B i ⊓ B j
mul : ∀ (i : ι), ∃ j, ↑(B j) * ↑(B j) ⊆ ↑(B i)
leftMul : ∀ (x : A) (i : ι), ∃ j, ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
x : A
i j : ι
hj : ↑(B j) ⊆ (fun y => x * y) ⁻¹' ↑(B i)
⊢ ↑(B j) ⊆ (fun x_1 => x_1 * x) ⁻¹' ↑(B i)
Theorem: CategoryTheory.Iso.cancel_iso_inv_right
File: Mathlib/CategoryTheory/Iso.lean

tactic: simp only [cancel_mono]
state_before: C : Type u
inst✝ : Category C
X✝ Y✝ Z✝ X Y Z : C
f f' : X ⟶ Y
g : Z ≅ Y
⊢ f ≫ g.inv = f' ≫ g.inv ↔ f = f'
Theorem: Hyperreal.infiniteNeg_mul_of_infinitePos_not_infinitesimal_neg
File: Mathlib/Data/Real/Hyperreal.lean

tactic: rw [← infinitePos_neg, ← neg_pos, neg_mul_eq_mul_neg, ← infinitesimal_neg]
state_before: x y : ℝ*
⊢ InfinitePos x → ¬Infinitesimal y → y < 0 → InfiniteNeg (x * y)

tactic: exact infinitePos_mul_of_infinitePos_not_infinitesimal_pos
state_before: x y : ℝ*
⊢ InfinitePos x → ¬Infinitesimal (-y) → 0 < -y → InfinitePos (x * -y)
Theorem: Subalgebra.iSupLift_mk
File: Mathlib/Algebra/Algebra/Subalgebra/Basic.lean

tactic: dsimp [iSupLift, inclusion]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
hx : ↑x ∈ T
⊢ ↑(iSupLift K dir f hf T hT) { val := ↑x, property := hx } = ↑(f i) x

tactic: rw [Set.iUnionLift_mk]
state_before: R : Type u
A : Type v
B : Type w
inst✝⁵ : CommSemiring R
inst✝⁴ : Semiring A
inst✝³ : Algebra R A
inst✝² : Semiring B
inst✝¹ : Algebra R B
S : Subalgebra R A
ι : Type u_1
inst✝ : Nonempty ι
K : ι → Subalgebra R A
dir : Directed (fun x x_1 => x ≤ x_1) K
f : (i : ι) → { x // x ∈ K i } →ₐ[R] B
hf : ∀ (i j : ι) (h : K i ≤ K j), f i = AlgHom.comp (f j) (inclusion h)
T : Subalgebra R A
hT : T = iSup K
i : ι
x : { x // x ∈ K i }
hx : ↑x ∈ T
⊢ Set.iUnionLift (fun i => ↑(K i)) (fun i x => ↑(f i) x)
      (_ :
        ∀ (i j : ι) (x : A) (hxi : x ∈ (fun i => ↑(K i)) i) (hxj : x ∈ (fun i => ↑(K i)) j),
          (fun i x => ↑(f i) x) i { val := x, property := hxi } = (fun i x => ↑(f i) x) j { val := x, property := hxj })
      ↑T (_ : ↑T ⊆ ⋃ (i : ι), ↑(K i)) { val := ↑x, property := hx } =
    ↑(f i) x
Theorem: CategoryTheory.epi_of_epi_fac
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: subst h
state_before: C : Type u
inst✝¹ : Category C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
h : X ⟶ Z
inst✝ : Epi h
w : f ≫ g = h
⊢ Epi g

tactic: exact epi_of_epi f g
state_before: C : Type u
inst✝¹ : Category C
X✝ Y✝ Z✝ X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝ : Epi (f ≫ g)
⊢ Epi g
Theorem: le_one_of_mul_le_left
File: Mathlib/Algebra/Order/Monoid/Lemmas.lean

tactic: simpa only [one_mul]
state_before: α : Type u_1
β : Type ?u.17091
inst✝² : MulOneClass α
inst✝¹ : LE α
inst✝ : ContravariantClass α α (swap fun x x_1 => x * x_1) fun x x_1 => x ≤ x_1
a b : α
h : a * b ≤ b
⊢ a * ?m.17465 h ≤ 1 * ?m.17465 h
Theorem: MvQPF.recF_eq
File: Mathlib/Data/QPF/Multivariate/Constructions/Fix.lean

tactic: rw [recF, MvPFunctor.wRec_eq]
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
β : Type u
g : F (α ::: β) → β
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
⊢ recF g (MvPFunctor.wMk (P F) a f' f) = g (abs { fst := a, snd := splitFun f' (recF g ∘ f) })

tactic: rfl
state_before: n : ℕ
F : TypeVec (n + 1) → Type u
inst✝ : MvFunctor F
q : MvQPF F
α : TypeVec n
β : Type u
g : F (α ::: β) → β
a : (P F).A
f' : MvPFunctor.B (MvPFunctor.drop (P F)) a ⟹ α
f : PFunctor.B (MvPFunctor.last (P F)) a → MvPFunctor.W (P F) α
⊢ g
      (abs
        { fst := a,
          snd :=
            splitFun f' fun i =>
              MvPFunctor.wRec (P F) (fun a f' _f rec => g (abs { fst := a, snd := splitFun f' rec })) (f i) }) =
    g
      (abs
        { fst := a,
          snd :=
            splitFun f' ((MvPFunctor.wRec (P F) fun a f' _f rec => g (abs { fst := a, snd := splitFun f' rec })) ∘ f) })
Theorem: IntermediateField.adjoin_finset_isCompactElement
File: Mathlib/FieldTheory/Adjoin.lean

tactic: have key : adjoin F ↑S = ⨆ x ∈ S, F⟮x⟯ := by
refine' le_antisymm (adjoin_le_iff.mpr fun x hx => SetLike.mem_coe.mpr
    (adjoin_simple_le_iff.mp (le_iSup_of_le x (le_iSup_iff.2 (fun E1 hE1 => hE1 hx)))))
      (iSup_le fun x => iSup_le fun hx =>  adjoin_simple_le_iff.mpr (subset_adjoin F S hx))
state_before: F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
⊢ IsCompactElement (adjoin F ↑S)

tactic: rw [key, ← Finset.sup_eq_iSup]
state_before: F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
key : adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
⊢ IsCompactElement (adjoin F ↑S)

tactic: exact finset_sup_compact_of_compact S fun x _ => adjoin_simple_isCompactElement x
state_before: F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
key : adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
⊢ IsCompactElement (Finset.sup S fun x => F⟮x⟯)

tactic: refine' le_antisymm (adjoin_le_iff.mpr fun x hx => SetLike.mem_coe.mpr
  (adjoin_simple_le_iff.mp (le_iSup_of_le x (le_iSup_iff.2 (fun E1 hE1 => hE1 hx)))))
    (iSup_le fun x => iSup_le fun hx =>  adjoin_simple_le_iff.mpr (subset_adjoin F S hx))
state_before: F : Type u_2
inst✝² : Field F
E : Type u_1
inst✝¹ : Field E
inst✝ : Algebra F E
S✝ : Set E
α : E
S : Finset E
⊢ adjoin F ↑S = ⨆ (x : E) (_ : x ∈ S), F⟮x⟯
Theorem: MeasureTheory.SignedMeasure.toJordanDecomposition_zero
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: apply toSignedMeasure_injective
state_before: α : Type u_1
β : Type ?u.74138
inst✝ : MeasurableSpace α
⊢ toJordanDecomposition 0 = 0

tactic: simp [toSignedMeasure_zero]
state_before: case a
α : Type u_1
β : Type ?u.74138
inst✝ : MeasurableSpace α
⊢ toSignedMeasure (toJordanDecomposition 0) = toSignedMeasure 0
Theorem: Real.hasStrictDerivAt_log
File: Mathlib/Analysis/SpecialFunctions/Log/Deriv.lean

tactic: cases' hx.lt_or_lt with hx hx
state_before: x : ℝ
hx : x ≠ 0
⊢ HasStrictDerivAt log x⁻¹ x

tactic: convert (hasStrictDerivAt_log_of_pos (neg_pos.mpr hx)).comp x (hasStrictDerivAt_neg x) using 1
state_before: case inl
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
⊢ HasStrictDerivAt log x⁻¹ x

tactic: ext y
state_before: case h.e'_6
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
⊢ log = log ∘ Neg.neg

tactic: exact (log_neg_eq_log y).symm
state_before: case h.e'_6.h
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
y : ℝ
⊢ log y = (log ∘ Neg.neg) y

tactic: field_simp [hx.ne]
state_before: case h.e'_7
x : ℝ
hx✝ : x ≠ 0
hx : x < 0
⊢ x⁻¹ = (-x)⁻¹ * -1

tactic: exact hasStrictDerivAt_log_of_pos hx
state_before: case inr
x : ℝ
hx✝ : x ≠ 0
hx : 0 < x
⊢ HasStrictDerivAt log x⁻¹ x
Theorem: Bool.and_false
File: src/lean/Init/SimpLemmas.lean

tactic: cases b <;> rfl
state_before: b : Bool
⊢ (b && false) = false
Theorem: DirectSum.one_mul
File: Mathlib/Algebra/DirectSum/Ring.lean

tactic: suffices mulHom A One.one = AddMonoidHom.id (⨁ i, A i) from FunLike.congr_fun this x
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ 1 * x = x

tactic: apply addHom_ext
state_before: ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ ↑(mulHom A) One.one = AddMonoidHom.id (⨁ (i : ι), A i)

tactic: intro i xi
state_before: case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
⊢ ∀ (i : ι) (y : A i),
    ↑(↑(mulHom A) One.one) (↑(of (fun i => A i) i) y) = ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) y)

tactic: simp only [One.one]
state_before: case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ ↑(↑(mulHom A) One.one) (↑(of (fun i => A i) i) xi) = ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)

tactic: rw [mulHom_of_of]
state_before: case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ ↑(↑(mulHom A) (↑(of (fun i => A i) 0) GradedMonoid.GOne.one)) (↑(of (fun i => A i) i) xi) =
    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)

tactic: exact of_eq_of_gradedMonoid_eq (one_mul <| GradedMonoid.mk i xi)
state_before: case H
ι : Type u_1
inst✝³ : DecidableEq ι
A : ι → Type u_2
inst✝² : (i : ι) → AddCommMonoid (A i)
inst✝¹ : AddMonoid ι
inst✝ : GSemiring A
x : ⨁ (i : ι), A i
i : ι
xi : A i
⊢ ↑(of A (0 + i)) (GradedMonoid.GMul.mul GradedMonoid.GOne.one xi) =
    ↑(AddMonoidHom.id (⨁ (i : ι), A i)) (↑(of (fun i => A i) i) xi)
Theorem: Quiver.Path.cast_nil
File: Mathlib/Combinatorics/Quiver/Cast.lean

tactic: subst_vars
state_before: U : Type u_1
inst✝ : Quiver U
u u' : U
hu : u = u'
⊢ cast hu hu nil = nil

tactic: rfl
state_before: U : Type u_1
inst✝ : Quiver U
u' : U
⊢ cast (_ : u' = u') (_ : u' = u') nil = nil
Theorem: Finset.min_erase_ne_self
File: Mathlib/Data/Finset/Lattice.lean

tactic: convert @max_erase_ne_self αᵒᵈ _ (toDual x) (s.map toDual.toEmbedding) using 1
state_before: F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
⊢ Finset.min (erase s x) ≠ ↑x

tactic: apply congr_arg
state_before: case h.e'_2.h
F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
e_1✝ : WithTop α = WithBot αᵒᵈ
⊢ Finset.min (erase s x) = Finset.max (erase (map (Equiv.toEmbedding toDual) s) (↑toDual x))

tactic: congr!
state_before: case h.e'_2.h.h
F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
e_1✝ : WithTop α = WithBot αᵒᵈ
⊢ erase s x = erase (map (Equiv.toEmbedding toDual) s) (↑toDual x)

tactic: ext
state_before: case h.e'_2.h.h.h.e'_3.h
F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
e_1✝¹ : WithTop α = WithBot αᵒᵈ
e_1✝ : α = αᵒᵈ
⊢ s = map (Equiv.toEmbedding toDual) s

tactic: simp only [mem_map_equiv]
state_before: case h.e'_2.h.h.h.e'_3.h.a
F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
e_1✝¹ : WithTop α = WithBot αᵒᵈ
e_1✝ : α = αᵒᵈ
a✝ : α
⊢ a✝ ∈ s ↔ a✝ ∈ map (Equiv.toEmbedding toDual) s

tactic: exact Iff.rfl
state_before: case h.e'_2.h.h.h.e'_3.h.a
F : Type ?u.373369
α : Type u_1
β : Type ?u.373375
γ : Type ?u.373378
ι : Type ?u.373381
κ : Type ?u.373384
inst✝ : LinearOrder α
s✝ : Finset α
H : Finset.Nonempty s✝
x : α
s : Finset α
e_1✝¹ : WithTop α = WithBot αᵒᵈ
e_1✝ : α = αᵒᵈ
a✝ : α
⊢ a✝ ∈ s ↔ ↑toDual.symm a✝ ∈ s
Theorem: Polynomial.roots_X_sub_C
File: Mathlib/Data/Polynomial/RingDivision.lean

tactic: ext s
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
r : R
⊢ roots (X - ↑C r) = {r}

tactic: rw [count_roots, rootMultiplicity_X_sub_C, count_singleton]
state_before: case a
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
inst✝ : IsDomain R
p q : R[X]
r s : R
⊢ count s (roots (X - ↑C r)) = count s {r}
Theorem: Turing.ToPartrec.Code.id_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [id]
state_before: v : List ℕ
⊢ eval id v = pure v
Theorem: isEmpty_algebraRat_iff_mixedCharZero
File: Mathlib/Algebra/CharP/MixedCharZero.lean

tactic: rw [← not_iff_not]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : CharZero R
⊢ IsEmpty (Algebra ℚ R) ↔ ∃ p, p > 0 ∧ MixedCharZero R p

tactic: push_neg
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : CharZero R
⊢ ¬IsEmpty (Algebra ℚ R) ↔ ¬∃ p, p > 0 ∧ MixedCharZero R p

tactic: rw [not_isEmpty_iff, ← EqualCharZero.iff_not_mixedCharZero]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : CharZero R
⊢ ¬IsEmpty (Algebra ℚ R) ↔ ∀ (p : ℕ), p > 0 → ¬MixedCharZero R p

tactic: apply EqualCharZero.nonempty_algebraRat_iff
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : CharZero R
⊢ Nonempty (Algebra ℚ R) ↔ ∀ (I : Ideal R), I ≠ ⊤ → CharZero (R ⧸ I)
Theorem: Finset.iSup_biUnion
File: Mathlib/Data/Finset/Lattice.lean

tactic: simp [@iSup_comm _ α, iSup_and]
state_before: F : Type ?u.455051
α : Type u_2
β : Type u_3
γ : Type u_1
ι : Type ?u.455063
κ : Type ?u.455066
inst✝¹ : CompleteLattice β
inst✝ : DecidableEq α
s : Finset γ
t : γ → Finset α
f : α → β
⊢ (⨆ (y : α) (_ : y ∈ Finset.biUnion s t), f y) = ⨆ (x : γ) (_ : x ∈ s) (y : α) (_ : y ∈ t x), f y
Theorem: Submonoid.closure_eq_image_prod
File: Mathlib/GroupTheory/Submonoid/Membership.lean

tactic: rw [closure_eq_mrange, coe_mrange, ← Set.range_list_map_coe, ← Set.range_comp]
state_before: M : Type u_1
A : Type ?u.78612
B : Type ?u.78615
inst✝ : Monoid M
s : Set M
⊢ ↑(closure s) = List.prod '' {l | ∀ (x : M), x ∈ l → x ∈ s}

tactic: exact congrArg _ (funext <| FreeMonoid.lift_apply _)
state_before: M : Type u_1
A : Type ?u.78612
B : Type ?u.78615
inst✝ : Monoid M
s : Set M
⊢ Set.range ↑(↑FreeMonoid.lift Subtype.val) = Set.range (List.prod ∘ List.map Subtype.val)
Theorem: hasSum_subtype_iff_of_support_subset
File: Mathlib/Topology/Algebra/InfiniteSum/Basic.lean

tactic: simpa using support_subset_iff'.1 hf
state_before: α : Type u_2
β : Type u_1
γ : Type ?u.26169
δ : Type ?u.26172
inst✝¹ : AddCommMonoid α
inst✝ : TopologicalSpace α
f g : β → α
a b : α
s✝ : Finset β
s : Set β
hf : support f ⊆ s
⊢ ∀ (x : β), (¬x ∈ Set.range fun a => ↑a) → f x = 0
Theorem: CategoryTheory.NonPreadditiveAbelian.sub_self
File: Mathlib/CategoryTheory/Abelian/NonPreadditive.lean

tactic: rw [sub_def, ← Category.comp_id a, ← prod.comp_lift, Category.assoc, diag_σ, comp_zero]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : NonPreadditiveAbelian C
X Y : C
a : X ⟶ Y
⊢ a - a = 0
Theorem: List.foldl_reverse
File: Std/Data/List/Init/Lemmas.lean

tactic: simp [foldl_eq_foldlM, foldr_eq_foldrM]
state_before: α : Type u_1
β : Type u_2
l : List α
f : β → α → β
b : β
⊢ foldl f b (reverse l) = foldr (fun x y => f y x) b l
Theorem: Nat.mul_mod_mul_left
File: Std/Data/Nat/Lemmas.lean

tactic: rw [y0, Nat.mul_zero, mod_zero, mod_zero]
state_before: z x y : Nat
y0 : y = 0
⊢ z * x % (z * y) = z * (x % y)

tactic: rw [z0, Nat.zero_mul, Nat.zero_mul, Nat.zero_mul, mod_zero]
state_before: z x y : Nat
y0 : ¬y = 0
z0 : z = 0
⊢ z * x % (z * y) = z * (x % y)

tactic: induction x using Nat.strongInductionOn with
| _ n IH =>
  have y0 : y > 0 := Nat.pos_of_ne_zero y0
  have z0 : z > 0 := Nat.pos_of_ne_zero z0
  cases Nat.lt_or_ge n y with
  | inl yn => rw [mod_eq_of_lt yn, mod_eq_of_lt (Nat.mul_lt_mul_of_pos_left yn z0)]
  | inr yn =>
    rw [mod_eq_sub_mod yn, mod_eq_sub_mod (Nat.mul_le_mul_left z yn),
      ← Nat.mul_sub_left_distrib]
    exact IH _ (sub_lt (Nat.lt_of_lt_of_le y0 yn) y0)
state_before: z x y : Nat
y0 : ¬y = 0
z0 : ¬z = 0
⊢ z * x % (z * y) = z * (x % y)

tactic: have y0 : y > 0 := Nat.pos_of_ne_zero y0
state_before: case ind
z y : Nat
y0 : ¬y = 0
z0 : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
⊢ z * n % (z * y) = z * (n % y)

tactic: have z0 : z > 0 := Nat.pos_of_ne_zero z0
state_before: case ind
z y : Nat
y0✝ : ¬y = 0
z0 : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
y0 : y > 0
⊢ z * n % (z * y) = z * (n % y)

tactic: cases Nat.lt_or_ge n y with
| inl yn => rw [mod_eq_of_lt yn, mod_eq_of_lt (Nat.mul_lt_mul_of_pos_left yn z0)]
| inr yn =>
  rw [mod_eq_sub_mod yn, mod_eq_sub_mod (Nat.mul_le_mul_left z yn),
    ← Nat.mul_sub_left_distrib]
  exact IH _ (sub_lt (Nat.lt_of_lt_of_le y0 yn) y0)
state_before: case ind
z y : Nat
y0✝ : ¬y = 0
z0✝ : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
y0 : y > 0
z0 : z > 0
⊢ z * n % (z * y) = z * (n % y)

tactic: rw [mod_eq_of_lt yn, mod_eq_of_lt (Nat.mul_lt_mul_of_pos_left yn z0)]
state_before: case ind.inl
z y : Nat
y0✝ : ¬y = 0
z0✝ : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
y0 : y > 0
z0 : z > 0
yn : n < y
⊢ z * n % (z * y) = z * (n % y)

tactic: rw [mod_eq_sub_mod yn, mod_eq_sub_mod (Nat.mul_le_mul_left z yn),
  ← Nat.mul_sub_left_distrib]
state_before: case ind.inr
z y : Nat
y0✝ : ¬y = 0
z0✝ : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
y0 : y > 0
z0 : z > 0
yn : n ≥ y
⊢ z * n % (z * y) = z * (n % y)

tactic: exact IH _ (sub_lt (Nat.lt_of_lt_of_le y0 yn) y0)
state_before: case ind.inr
z y : Nat
y0✝ : ¬y = 0
z0✝ : ¬z = 0
n : Nat
IH : ∀ (m : Nat), m < n → z * m % (z * y) = z * (m % y)
y0 : y > 0
z0 : z > 0
yn : n ≥ y
⊢ z * (n - y) % (z * y) = z * ((n - y) % y)
Theorem: Module.map_eval_injective
File: Mathlib/LinearAlgebra/Dual.lean

tactic: apply Submodule.map_injective_of_injective
state_before: K : Type u₁
V : Type u₂
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
⊢ Function.Injective (Submodule.map (eval K V))

tactic: rw [← LinearMap.ker_eq_bot]
state_before: case hf
K : Type u₁
V : Type u₂
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
⊢ Function.Injective ↑(eval K V)

tactic: apply eval_ker K V
state_before: case hf
K : Type u₁
V : Type u₂
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
⊢ ker (eval K V) = ⊥
Theorem: Finset.image₂_empty_right
File: Mathlib/Data/Finset/NAry.lean

tactic: simp
state_before: α : Type u_2
α' : Type ?u.24579
β : Type u_3
β' : Type ?u.24585
γ : Type u_1
γ' : Type ?u.24591
δ : Type ?u.24594
δ' : Type ?u.24597
ε : Type ?u.24600
ε' : Type ?u.24603
ζ : Type ?u.24606
ζ' : Type ?u.24609
ν : Type ?u.24612
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
⊢ ↑(image₂ f s ∅) = ↑∅
Theorem: Substring.ValidFor.next_stop
File: Std/Data/String/Lemmas.lean

tactic: simp [Substring.next, Pos.add_eq]
state_before: l m r : List Char
⊢ Substring.next
      { str := { data := l ++ m ++ r }, startPos := { byteIdx := utf8Len l },
        stopPos := { byteIdx := utf8Len l + utf8Len m } }
      { byteIdx := utf8Len m } =
    { byteIdx := utf8Len m }
Theorem: Associates.isUnit_iff_eq_bot
File: Mathlib/Algebra/Associated.lean

tactic: rw [Associates.isUnit_iff_eq_one, bot_eq_one]
state_before: α : Type u_1
β : Type ?u.294633
γ : Type ?u.294636
δ : Type ?u.294639
inst✝ : CommMonoid α
a : Associates α
⊢ IsUnit a ↔ a = ⊥