tasksource/leandojo huggingface dataset:
Theorem: Order.not_isPredLimit_iff
File: Mathlib/Order/SuccPred/Limit.lean

tactic: rw [← isSuccLimit_toDual_iff]
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : PredOrder α
a b : α
C : α → Sort ?u.16674
⊢ ¬IsPredLimit a ↔ ∃ b, ¬IsMin b ∧ pred b = a

tactic: exact not_isSuccLimit_iff
state_before: α : Type u_1
inst✝¹ : PartialOrder α
inst✝ : PredOrder α
a b : α
C : α → Sort ?u.16674
⊢ ¬IsSuccLimit (↑toDual a) ↔ ∃ b, ¬IsMin b ∧ pred b = a
Theorem: CategoryTheory.strongMono_comp
File: Mathlib/CategoryTheory/Limits/Shapes/StrongEpi.lean

tactic: intros
state_before: C : Type u
inst✝² : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝¹ : StrongMono f
inst✝ : StrongMono g
⊢ ∀ ⦃X Y : C⦄ (z : X ⟶ Y) [inst : Epi z], HasLiftingProperty z (f ≫ g)

tactic: infer_instance
state_before: C : Type u
inst✝³ : Category C
P Q R : C
f : P ⟶ Q
g : Q ⟶ R
inst✝² : StrongMono f
inst✝¹ : StrongMono g
X✝ Y✝ : C
z✝ : X✝ ⟶ Y✝
inst✝ : Epi z✝
⊢ HasLiftingProperty z✝ (f ≫ g)
Theorem: Nat.Prime.prod_divisors
File: Mathlib/NumberTheory/Divisors.lean

tactic: rw [← cons_self_properDivisors h.ne_zero, prod_cons, h.prod_properDivisors]
state_before: n : ℕ
α : Type u_1
inst✝ : CommMonoid α
p : ℕ
f : ℕ → α
h : Prime p
⊢ ∏ x in Nat.divisors p, f x = f p * f 1
Theorem: CompleteLattice.independent_of_dfinsupp_lsum_injective
File: Mathlib/LinearAlgebra/Dfinsupp.lean

tactic: rw [independent_iff_forall_dfinsupp]
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
⊢ Independent p

tactic: intro i x v hv
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
⊢ ∀ (i : ι) (x : { x // x ∈ p i }) (v : Π₀ (i : ι), { x // x ∈ p i }),
    ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x → x = 0

tactic: replace hv :
  lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (erase i v) =
    lsum ℕ (M := fun i ↦ ↥(p i)) (fun i => (p i).subtype) (single i x)
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x
⊢ x = 0

tactic: have := FunLike.ext_iff.mp (h hv) i
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv :
  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
⊢ x = 0

tactic: simpa [eq_comm] using this
state_before: ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv :
  ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
this : ↑(erase i v) i = ↑(single i x) i
⊢ x = 0

tactic: simpa only [lsum_single] using hv
state_before: case hv
ι : Type u_3
R : Type u_1
S : Type ?u.488476
M : ι → Type ?u.488481
N : Type u_2
dec_ι : DecidableEq ι
inst✝² : Semiring R
inst✝¹ : AddCommMonoid N
inst✝ : Module R N
p : ι → Submodule R N
h : Function.Injective ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i))
i : ι
x : { x // x ∈ p i }
v : Π₀ (i : ι), { x // x ∈ p i }
hv : ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑x
⊢ ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (erase i v) = ↑(↑(lsum ℕ) fun i => Submodule.subtype (p i)) (single i x)
Theorem: Nat.xgcd_aux_fst
File: Mathlib/Data/Int/GCD.lean

tactic: simp
state_before: x y : ℕ
⊢ ∀ (n : ℕ) (s t s' t' : ℤ), (xgcdAux 0 s t n s' t').fst = gcd 0 n

tactic: simp [xgcd_aux_rec, h, IH]
state_before: x✝ y✝ x y : ℕ
h : 0 < x
IH : ∀ (s t s' t' : ℤ), (xgcdAux (y % x) s t x s' t').fst = gcd (y % x) x
s t s' t' : ℤ
⊢ (xgcdAux x s t y s' t').fst = gcd x y

tactic: rw [← gcd_rec]
state_before: x✝ y✝ x y : ℕ
h : 0 < x
IH : ∀ (s t s' t' : ℤ), (xgcdAux (y % x) s t x s' t').fst = gcd (y % x) x
s t s' t' : ℤ
⊢ gcd (y % x) x = gcd x y
Theorem: List.bagInter_nil
File: Mathlib/Data/List/Lattice.lean

tactic: cases l <;> rfl
state_before: α : Type u_1
l✝ l₁ l₂ : List α
p : α → Prop
a : α
inst✝ : DecidableEq α
l : List α
⊢ List.bagInter l [] = []
Theorem: List.sizeOf_get
File: src/lean/Init/Data/List/BasicAux.lean

tactic: match as, i with
| a::as, ⟨0, _⟩  => simp_arith [get]
| a::as, ⟨i+1, h⟩ =>
  have ih := sizeOf_get as ⟨i, Nat.le_of_succ_le_succ h⟩
  apply Nat.lt_trans ih
  simp_arith
state_before: α : Type u_1
inst✝ : SizeOf α
as : List α
i : Fin (length as)
⊢ sizeOf (get as i) < sizeOf as

tactic: simp_arith [get]
state_before: α : Type u_1
inst✝ : SizeOf α
as✝ : List α
i : Fin (length as✝)
a : α
as : List α
isLt✝ : 0 < length (a :: as)
⊢ sizeOf (get (a :: as) { val := 0, isLt := isLt✝ }) < sizeOf (a :: as)

tactic: have ih := sizeOf_get as ⟨i, Nat.le_of_succ_le_succ h⟩
state_before: α : Type u_1
inst✝ : SizeOf α
as✝ : List α
i✝ : Fin (length as✝)
a : α
as : List α
i : Nat
h : i + 1 < length (a :: as)
⊢ sizeOf (get (a :: as) { val := i + 1, isLt := h }) < sizeOf (a :: as)

tactic: apply Nat.lt_trans ih
state_before: α : Type u_1
inst✝ : SizeOf α
as✝ : List α
i✝ : Fin (length as✝)
a : α
as : List α
i : Nat
h : i + 1 < length (a :: as)
ih : sizeOf (get as { val := i, isLt := (_ : Nat.succ i ≤ length as) }) < sizeOf as
⊢ sizeOf (get (a :: as) { val := i + 1, isLt := h }) < sizeOf (a :: as)

tactic: simp_arith
state_before: α : Type u_1
inst✝ : SizeOf α
as✝ : List α
i✝ : Fin (length as✝)
a : α
as : List α
i : Nat
h : i + 1 < length (a :: as)
ih : sizeOf (get as { val := i, isLt := (_ : Nat.succ i ≤ length as) }) < sizeOf as
⊢ sizeOf as < sizeOf (a :: as)
Theorem: Cardinal.empty_infinite_Theory_isComplete
File: Mathlib/ModelTheory/Satisfiability.lean

tactic: simp
state_before: L : Language
κ : Cardinal
T : Theory L
⊢ lift (card Language.empty) ≤ lift ℵ₀
Theorem: IsROrC.real_smul_eq_coe_smul
File: Mathlib/Data/IsROrC/Basic.lean

tactic: rw [IsROrC.ofReal_alg, smul_one_smul]
state_before: K : Type u_2
E : Type u_1
inst✝⁴ : IsROrC K
inst✝³ : AddCommGroup E
inst✝² : Module K E
inst✝¹ : Module ℝ E
inst✝ : IsScalarTower ℝ K E
r : ℝ
x : E
⊢ r • x = ↑r • x
Theorem: Ideal.Quotient.mk_eq_mk_iff_sub_mem
File: Mathlib/RingTheory/Ideal/Quotient.lean

tactic: rw [← eq_zero_iff_mem, map_sub, sub_eq_zero]
state_before: R : Type u
inst✝ : CommRing R
I : Ideal R
a b : R
S : Type v
x✝ y✝ x y : R
⊢ ↑(mk I) x = ↑(mk I) y ↔ x - y ∈ I
Theorem: CategoryTheory.Splitting.split
File: Mathlib/Algebra/Homology/ShortExact/Preadditive.lean

tactic: rw [← h.inl_comp_iso_eq, Category.assoc, h.iso_comp_eq_snd, biprod.inl_snd]
state_before: 𝒜 : Type u_1
inst✝² : Category 𝒜
A B C A' B' C' : 𝒜
f : A ⟶ B
g : B ⟶ C
f' : A' ⟶ B'
g' : B' ⟶ C'
inst✝¹ : Preadditive 𝒜
inst✝ : HasBinaryBiproducts 𝒜
h : Splitting f g
⊢ f ≫ g = 0
Theorem: List.disjoint_append_right
File: Std/Data/List/Lemmas.lean

tactic: rw [disjoint_append_left]
state_before: α✝ : Type u_1
l l₁ l₂ : List α✝
⊢ Disjoint (l₁ ++ l₂) l ↔ Disjoint l l₁ ∧ Disjoint l l₂

tactic: simp [disjoint_comm]
state_before: α✝ : Type u_1
l l₁ l₂ : List α✝
⊢ Disjoint l₁ l ∧ Disjoint l₂ l ↔ Disjoint l l₁ ∧ Disjoint l l₂
Theorem: ENNReal.toNNReal_lt_toNNReal
File: Mathlib/Data/Real/ENNReal.lean

tactic: rwa [← coe_toNNReal ha, ← coe_toNNReal hb, coe_lt_coe]
state_before: α : Type ?u.800710
β : Type ?u.800713
a b c d : ℝ≥0∞
r p q : ℝ≥0
ha : a ≠ ⊤
hb : b ≠ ⊤
h : ENNReal.toNNReal a < ENNReal.toNNReal b
⊢ a < b
Theorem: Basis.eq_ofRepr_eq_repr
File: Mathlib/LinearAlgebra/Basis.lean

tactic: ext
state_before: ι : Type u_1
ι' : Type ?u.247588
R : Type u_2
R₂ : Type ?u.247594
K : Type ?u.247597
M : Type u_3
M' : Type ?u.247603
M'' : Type ?u.247606
V : Type u
V' : Type ?u.247611
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : Module R M'
b b₁✝ : Basis ι R M
i : ι
c : R
x : M
R₁ : Type ?u.247723
inst✝⁴ : Semiring R₁
σ : R →+* R₁
σ' : R₁ →+* R
inst✝³ : RingHomInvPair σ σ'
inst✝² : RingHomInvPair σ' σ
M₁ : Type ?u.247927
inst✝¹ : AddCommMonoid M₁
inst✝ : Module R₁ M₁
b₁ b₂ : Basis ι R M
h : ∀ (x : M) (i : ι), ↑(↑b₁.repr x) i = ↑(↑b₂.repr x) i
⊢ b₁.repr = b₂.repr

tactic: apply h
state_before: case h.h
ι : Type u_1
ι' : Type ?u.247588
R : Type u_2
R₂ : Type ?u.247594
K : Type ?u.247597
M : Type u_3
M' : Type ?u.247603
M'' : Type ?u.247606
V : Type u
V' : Type ?u.247611
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid M'
inst✝⁵ : Module R M'
b b₁✝ : Basis ι R M
i : ι
c : R
x : M
R₁ : Type ?u.247723
inst✝⁴ : Semiring R₁
σ : R →+* R₁
σ' : R₁ →+* R
inst✝³ : RingHomInvPair σ σ'
inst✝² : RingHomInvPair σ' σ
M₁ : Type ?u.247927
inst✝¹ : AddCommMonoid M₁
inst✝ : Module R₁ M₁
b₁ b₂ : Basis ι R M
h : ∀ (x : M) (i : ι), ↑(↑b₁.repr x) i = ↑(↑b₂.repr x) i
x✝ : M
a✝ : ι
⊢ ↑(↑b₁.repr x✝) a✝ = ↑(↑b₂.repr x✝) a✝
Theorem: ClosedEmbedding.closed_iff_preimage_closed
File: Mathlib/Topology/Maps.lean

tactic: rw [hf.closed_iff_image_closed, image_preimage_eq_of_subset hs]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.271027
δ : Type ?u.271030
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
f : α → β
hf : ClosedEmbedding f
s : Set β
hs : s ⊆ range f
⊢ IsClosed s ↔ IsClosed (f ⁻¹' s)
Theorem: PNat.card_fintype_Icc
File: Mathlib/Data/PNat/Interval.lean

tactic: rw [← card_Icc, Fintype.card_ofFinset]
state_before: a b : ℕ+
⊢ Fintype.card ↑(Set.Icc a b) = ↑b + 1 - ↑a
Theorem: TopCat.Presheaf.app_injective_of_stalkFunctor_map_injective
File: Mathlib/Topology/Sheaves/Stalks.lean

tactic: erw [stalkFunctor_map_germ_apply, stalkFunctor_map_germ_apply, hst]
state_before: C : Type u
inst✝⁶ : Category C
inst✝⁵ : HasColimits C
X Y Z : TopCat
inst✝⁴ : ConcreteCategory C
inst✝³ : PreservesFilteredColimits (forget C)
inst✝² : HasLimits C
inst✝¹ : PreservesLimits (forget C)
inst✝ : ReflectsIsomorphisms (forget C)
F : Sheaf C X
G : Presheaf C X
f : F.val ⟶ G
U : Opens ↑X
h : ∀ (x : { x // x ∈ U }), Function.Injective ((forget C).map ((stalkFunctor C ↑x).map f))
s t : (forget C).obj (F.val.obj U.op)
hst : (forget C).map (f.app U.op) s = (forget C).map (f.app U.op) t
x : { x // x ∈ U }
⊢ (forget C).map ((stalkFunctor C ↑x).map f) ((forget C).map (germ (Sheaf.presheaf F) x) s) =
    (forget C).map ((stalkFunctor C ↑x).map f) ((forget C).map (germ (Sheaf.presheaf F) x) t)
Theorem: MeasureTheory.exists_null_frontiers_thickening
File: Mathlib/MeasureTheory/Measure/Portmanteau.lean

tactic: rcases exists_seq_strictAnti_tendsto (0 : ℝ) with ⟨Rs, ⟨_, ⟨Rs_pos, Rs_lim⟩⟩⟩
state_before: Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0

tactic: have obs := fun n : ℕ => exists_null_frontier_thickening μ s (Rs_pos n)
state_before: case intro.intro.intro
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
Rs : ℕ → ℝ
left✝ : StrictAnti Rs
Rs_pos : ∀ (n : ℕ), 0 < Rs n
Rs_lim : Tendsto Rs atTop (𝓝 0)
⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0

tactic: refine' ⟨fun n : ℕ => (obs n).choose, ⟨_, _⟩⟩
state_before: case intro.intro.intro
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
Rs : ℕ → ℝ
left✝ : StrictAnti Rs
Rs_pos : ∀ (n : ℕ), 0 < Rs n
Rs_lim : Tendsto Rs atTop (𝓝 0)
obs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0
⊢ ∃ rs, Tendsto rs atTop (𝓝 0) ∧ ∀ (n : ℕ), 0 < rs n ∧ ↑↑μ (frontier (Metric.thickening (rs n) s)) = 0

tactic: exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds Rs_lim
  (fun n => (obs n).choose_spec.1.1.le) fun n => (obs n).choose_spec.1.2.le
state_before: case intro.intro.intro.refine'_1
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
Rs : ℕ → ℝ
left✝ : StrictAnti Rs
Rs_pos : ∀ (n : ℕ), 0 < Rs n
Rs_lim : Tendsto Rs atTop (𝓝 0)
obs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0
⊢ Tendsto (fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) atTop (𝓝 0)

tactic: exact fun n => ⟨(obs n).choose_spec.1.1, (obs n).choose_spec.2⟩
state_before: case intro.intro.intro.refine'_2
Ω : Type u_1
inst✝³ : PseudoEMetricSpace Ω
inst✝² : MeasurableSpace Ω
inst✝¹ : OpensMeasurableSpace Ω
μ : Measure Ω
inst✝ : SigmaFinite μ
s : Set Ω
Rs : ℕ → ℝ
left✝ : StrictAnti Rs
Rs_pos : ∀ (n : ℕ), 0 < Rs n
Rs_lim : Tendsto Rs atTop (𝓝 0)
obs : ∀ (n : ℕ), ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0
⊢ ∀ (n : ℕ),
    0 < (fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) n ∧
      ↑↑μ
          (frontier
            (Metric.thickening
              ((fun n => Exists.choose (_ : ∃ r, r ∈ Ioo 0 (Rs n) ∧ ↑↑μ (frontier (Metric.thickening r s)) = 0)) n)
              s)) =
        0
Theorem: CategoryTheory.Limits.factorThruImageSubobject_comp_self_assoc
File: Mathlib/CategoryTheory/Subobject/Limits.lean

tactic: ext
state_before: C : Type u
inst✝¹ : Category C
X Y Z : C
f : X ⟶ Y
inst✝ : HasImage f
W W' : C
k : W ⟶ W'
k' : W' ⟶ X
h : Factors (imageSubobject f) (k ≫ k' ≫ f)
⊢ factorThru (imageSubobject f) (k ≫ k' ≫ f) h = k ≫ k' ≫ factorThruImageSubobject f

tactic: simp
state_before: case h
C : Type u
inst✝¹ : Category C
X Y Z : C
f : X ⟶ Y
inst✝ : HasImage f
W W' : C
k : W ⟶ W'
k' : W' ⟶ X
h : Factors (imageSubobject f) (k ≫ k' ≫ f)
⊢ factorThru (imageSubobject f) (k ≫ k' ≫ f) h ≫ arrow (imageSubobject f) =
    (k ≫ k' ≫ factorThruImageSubobject f) ≫ arrow (imageSubobject f)
Theorem: MvPowerSeries.X_pow_eq
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: induction' n with n ih
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
s : σ
n : ℕ
⊢ X s ^ n = ↑(monomial R (single s n)) 1

tactic: simp
state_before: case zero
σ : Type u_1
R : Type u_2
inst✝ : Semiring R
s : σ
⊢ X s ^ Nat.zero = ↑(monomial R (single s Nat.zero)) 1

tactic: rw [pow_succ', ih, Nat.succ_eq_add_one, Finsupp.single_add, X, monomial_mul_monomial, one_mul]
state_before: case succ
σ : Type u_1
R : Type u_2
inst✝ : Semiring R
s : σ
n : ℕ
ih : X s ^ n = ↑(monomial R (single s n)) 1
⊢ X s ^ Nat.succ n = ↑(monomial R (single s (Nat.succ n))) 1
Theorem: Associates.factors_mul
File: Mathlib/RingTheory/UniqueFactorizationDomain.lean

tactic: cases subsingleton_or_nontrivial α
state_before: α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a b : Associates α
⊢ factors (a * b) = factors a + factors b

tactic: refine' eq_of_prod_eq_prod (eq_of_factors_eq_factors _)
state_before: case inr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a b : Associates α
h✝ : Nontrivial α
⊢ factors (a * b) = factors a + factors b

tactic: rw [prod_add, factors_prod, factors_prod, factors_prod]
state_before: case inr
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a b : Associates α
h✝ : Nontrivial α
⊢ factors (FactorSet.prod (factors (a * b))) = factors (FactorSet.prod (factors a + factors b))

tactic: simp [Subsingleton.elim a 0]
state_before: case inl
α : Type u_1
inst✝¹ : CancelCommMonoidWithZero α
dec_irr : (p : Associates α) → Decidable (Irreducible p)
inst✝ : UniqueFactorizationMonoid α
dec : DecidableEq α
dec' : DecidableEq (Associates α)
a b : Associates α
h✝ : Subsingleton α
⊢ factors (a * b) = factors a + factors b
Theorem: Polynomial.cyclotomic.dvd_X_pow_sub_one
File: Mathlib/RingTheory/Polynomial/Cyclotomic/Basic.lean

tactic: suffices cyclotomic n ℤ ∣ X ^ n - 1 by
  simpa only [map_cyclotomic_int, Polynomial.map_sub, Polynomial.map_one, Polynomial.map_pow,
    Polynomial.map_X] using map_dvd (Int.castRingHom R) this
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic n R ∣ X ^ n - 1

tactic: rcases n.eq_zero_or_pos with (rfl | hn)
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic n ℤ ∣ X ^ n - 1

tactic: rw [← prod_cyclotomic_eq_X_pow_sub_one hn]
state_before: case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ X ^ n - 1

tactic: exact Finset.dvd_prod_of_mem _ (n.mem_divisors_self hn.ne')
state_before: case inr
n : ℕ
R : Type u_1
inst✝ : Ring R
hn : n > 0
⊢ cyclotomic n ℤ ∣ ∏ i in Nat.divisors n, cyclotomic i ℤ

tactic: simpa only [map_cyclotomic_int, Polynomial.map_sub, Polynomial.map_one, Polynomial.map_pow,
  Polynomial.map_X] using map_dvd (Int.castRingHom R) this
state_before: n : ℕ
R : Type u_1
inst✝ : Ring R
this : cyclotomic n ℤ ∣ X ^ n - 1
⊢ cyclotomic n R ∣ X ^ n - 1

tactic: simp
state_before: case inl
R : Type u_1
inst✝ : Ring R
⊢ cyclotomic 0 ℤ ∣ X ^ 0 - 1
Theorem: CompleteLattice.IsSupFiniteCompact.isSupClosedCompact
File: Mathlib/Order/CompactlyGenerated.lean

tactic: intro s hne hsc
state_before: ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
⊢ IsSupClosedCompact α

tactic: obtain ⟨t, ht₁, ht₂⟩ := h s
state_before: ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
⊢ sSup s ∈ s

tactic: clear h
state_before: case intro.intro
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
h : IsSupFiniteCompact α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
t : Finset α
ht₁ : ↑t ⊆ s
ht₂ : sSup s = Finset.sup t id
⊢ sSup s ∈ s

tactic: cases' t.eq_empty_or_nonempty with h h
state_before: case intro.intro
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
t : Finset α
ht₁ : ↑t ⊆ s
ht₂ : sSup s = Finset.sup t id
⊢ sSup s ∈ s

tactic: subst h
state_before: case intro.intro.inl
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
t : Finset α
ht₁ : ↑t ⊆ s
ht₂ : sSup s = Finset.sup t id
h : t = ∅
⊢ sSup s ∈ s

tactic: rw [Finset.sup_empty] at ht₂
state_before: case intro.intro.inl
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
ht₁ : ↑∅ ⊆ s
ht₂ : sSup s = Finset.sup ∅ id
⊢ sSup s ∈ s

tactic: rw [ht₂]
state_before: case intro.intro.inl
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
ht₁ : ↑∅ ⊆ s
ht₂ : sSup s = ⊥
⊢ sSup s ∈ s

tactic: simp [eq_singleton_bot_of_sSup_eq_bot_of_nonempty ht₂ hne]
state_before: case intro.intro.inl
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
ht₁ : ↑∅ ⊆ s
ht₂ : sSup s = ⊥
⊢ ⊥ ∈ s

tactic: rw [ht₂]
state_before: case intro.intro.inr
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
t : Finset α
ht₁ : ↑t ⊆ s
ht₂ : sSup s = Finset.sup t id
h : Finset.Nonempty t
⊢ sSup s ∈ s

tactic: exact t.sup_closed_of_sup_closed h ht₁ hsc
state_before: case intro.intro.inr
ι : Sort ?u.26576
α : Type u_1
inst✝ : CompleteLattice α
f : ι → α
s : Set α
hne : Set.Nonempty s
hsc : ∀ (a : α), a ∈ s → ∀ (b : α), b ∈ s → a ⊔ b ∈ s
t : Finset α
ht₁ : ↑t ⊆ s
ht₂ : sSup s = Finset.sup t id
h : Finset.Nonempty t
⊢ Finset.sup t id ∈ s
Theorem: IsLocalization.coeSubmodule_span
File: Mathlib/RingTheory/Localization/Submodule.lean

tactic: rw [IsLocalization.coeSubmodule, Ideal.span, Submodule.map_span]
state_before: R : Type u_1
inst✝³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Type ?u.64270
inst✝ : CommRing P
s : Set R
⊢ coeSubmodule S (Ideal.span s) = Submodule.span R (↑(algebraMap R S) '' s)

tactic: rfl
state_before: R : Type u_1
inst✝³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Type ?u.64270
inst✝ : CommRing P
s : Set R
⊢ Submodule.span R (↑(Algebra.linearMap R S) '' s) = Submodule.span R (↑(algebraMap R S) '' s)