tasksource/leandojo huggingface dataset:
Theorem: MeasureTheory.IsFundamentalDomain.set_lintegral_eq
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

tactic: simp only [hf, inter_comm]
state_before: G : Type u_1
H : Type ?u.260361
α : Type u_2
β : Type ?u.260367
E : Type ?u.260370
inst✝¹⁰ : Group G
inst✝⁹ : Group H
inst✝⁸ : MulAction G α
inst✝⁷ : MeasurableSpace α
inst✝⁶ : MulAction H β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : NormedAddCommGroup E
s t : Set α
μ : Measure α
inst✝³ : MeasurableSpace G
inst✝² : MeasurableSMul G α
inst✝¹ : SMulInvariantMeasure G α μ
inst✝ : Countable G
ν : Measure α
hs : IsFundamentalDomain G s
ht : IsFundamentalDomain G t
f : α → ℝ≥0∞
hf : ∀ (g : G) (x : α), f (g • x) = f x
⊢ (∑' (g : G), ∫⁻ (x : α) in s ∩ g • t, f x ∂μ) = ∑' (g : G), ∫⁻ (x : α) in g • t ∩ s, f (g⁻¹ • x) ∂μ
Theorem: CategoryTheory.isSeparator_iff_faithful_preadditiveCoyonedaObj
File: Mathlib/CategoryTheory/Preadditive/Generator.lean

tactic: rw [isSeparator_iff_faithful_preadditiveCoyoneda, preadditiveCoyoneda_obj]
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Preadditive C
G : C
⊢ IsSeparator G ↔ Faithful (preadditiveCoyonedaObj G.op)

tactic: exact ⟨fun h => Faithful.of_comp _ (forget₂ _ AddCommGroupCat.{v}), fun h => Faithful.comp _ _⟩
state_before: C : Type u
inst✝¹ : Category C
inst✝ : Preadditive C
G : C
⊢ Faithful (preadditiveCoyonedaObj G.op ⋙ forget₂ (ModuleCat (End G.op)) AddCommGroupCat) ↔
    Faithful (preadditiveCoyonedaObj G.op)
Theorem: Real.sqrt_eq_cases
File: Mathlib/Data/Real/Sqrt.lean

tactic: constructor
state_before: x y : ℝ
⊢ sqrt x = y ↔ y * y = x ∧ 0 ≤ y ∨ x < 0 ∧ y = 0

tactic: rintro rfl
state_before: case mp
x y : ℝ
⊢ sqrt x = y → y * y = x ∧ 0 ≤ y ∨ x < 0 ∧ y = 0

tactic: cases' le_or_lt 0 x with hle hlt
state_before: case mp
x : ℝ
⊢ sqrt x * sqrt x = x ∧ 0 ≤ sqrt x ∨ x < 0 ∧ sqrt x = 0

tactic: exact Or.inl ⟨mul_self_sqrt hle, sqrt_nonneg x⟩
state_before: case mp.inl
x : ℝ
hle : 0 ≤ x
⊢ sqrt x * sqrt x = x ∧ 0 ≤ sqrt x ∨ x < 0 ∧ sqrt x = 0

tactic: exact Or.inr ⟨hlt, sqrt_eq_zero_of_nonpos hlt.le⟩
state_before: case mp.inr
x : ℝ
hlt : x < 0
⊢ sqrt x * sqrt x = x ∧ 0 ≤ sqrt x ∨ x < 0 ∧ sqrt x = 0

tactic: rintro (⟨rfl, hy⟩ | ⟨hx, rfl⟩)
state_before: case mpr
x y : ℝ
⊢ y * y = x ∧ 0 ≤ y ∨ x < 0 ∧ y = 0 → sqrt x = y

tactic: exacts [sqrt_mul_self hy, sqrt_eq_zero_of_nonpos hx.le]
state_before: case mpr.inl.intro
y : ℝ
hy : 0 ≤ y
⊢ sqrt (y * y) = y

case mpr.inr.intro
x : ℝ
hx : x < 0
⊢ sqrt x = 0
Theorem: CircleDeg1Lift.translationNumber_pow
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: simp
state_before: f g : CircleDeg1Lift
⊢ τ (f ^ 0) = ↑0 * τ f

tactic: rw [pow_succ', translationNumber_mul_of_commute (Commute.pow_self f n),
  translationNumber_pow n, Nat.cast_add_one, add_mul, one_mul]
state_before: f g : CircleDeg1Lift
n : ℕ
⊢ τ (f ^ (n + 1)) = ↑(n + 1) * τ f
Theorem: Finset.prod_congr
File: Mathlib/Algebra/BigOperators/Basic.lean

tactic: rw [h]
state_before: ι : Type ?u.280993
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
h : s₁ = s₂
⊢ (∀ (x : α), x ∈ s₂ → f x = g x) → Finset.prod s₁ f = Finset.prod s₂ g

tactic: exact fold_congr
state_before: ι : Type ?u.280993
β : Type u
α : Type v
γ : Type w
s s₁ s₂ : Finset α
a : α
f g : α → β
inst✝ : CommMonoid β
h : s₁ = s₂
⊢ (∀ (x : α), x ∈ s₂ → f x = g x) → Finset.prod s₂ f = Finset.prod s₂ g
Theorem: nhdsWithin_inter
File: Mathlib/Topology/ContinuousOn.lean

tactic: delta nhdsWithin
state_before: α : Type u_1
β : Type ?u.17060
γ : Type ?u.17063
δ : Type ?u.17066
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝[s ∩ t] a = 𝓝[s] a ⊓ 𝓝[t] a

tactic: rw [inf_left_comm, inf_assoc, inf_principal, ← inf_assoc, inf_idem]
state_before: α : Type u_1
β : Type ?u.17060
γ : Type ?u.17063
δ : Type ?u.17066
inst✝ : TopologicalSpace α
a : α
s t : Set α
⊢ 𝓝 a ⊓ 𝓟 (s ∩ t) = 𝓝 a ⊓ 𝓟 s ⊓ (𝓝 a ⊓ 𝓟 t)
Theorem: LinearMap.surjective_or_eq_zero
File: Mathlib/RingTheory/SimpleModule.lean

tactic: rw [← range_eq_top, ← range_eq_bot, or_comm]
state_before: R : Type u_1
inst✝⁵ : Ring R
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
m : Submodule R M
N : Type u_2
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : IsSimpleModule R N
f : M →ₗ[R] N
⊢ Function.Surjective ↑f ∨ f = 0

tactic: apply eq_bot_or_eq_top
state_before: R : Type u_1
inst✝⁵ : Ring R
M : Type u_3
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
m : Submodule R M
N : Type u_2
inst✝² : AddCommGroup N
inst✝¹ : Module R N
inst✝ : IsSimpleModule R N
f : M →ₗ[R] N
⊢ range f = ⊥ ∨ range f = ⊤
Theorem: CategoryTheory.Abelian.exact_epi_comp_iff
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: refine' ⟨fun hfg => _, fun h => exact_epi_comp h⟩
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
⊢ Exact (h ≫ f) g ↔ Exact f g

tactic: let hc := isCokernelOfComp _ _ (colimit.isColimit (parallelPair (h ≫ f) 0))
  (by rw [← cancel_epi h, ← Category.assoc, CokernelCofork.condition, comp_zero]) rfl
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
hfg : Exact (h ≫ f) g
⊢ Exact f g

tactic: refine' (exact_iff' _ _ (limit.isLimit _) hc).2 ⟨_, ((exact_iff _ _).1 hfg).2⟩
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
hfg : Exact (h ≫ f) g
hc : IsColimit
  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=
  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)
⊢ Exact f g

tactic: exact zero_of_epi_comp h (by rw [← hfg.1, Category.assoc])
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
hfg : Exact (h ≫ f) g
hc : IsColimit
  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=
  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)
⊢ f ≫ g = 0

tactic: rw [← cancel_epi h, ← Category.assoc, CokernelCofork.condition, comp_zero]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
hfg : Exact (h ≫ f) g
⊢ f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0

tactic: rw [← hfg.1, Category.assoc]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : Abelian C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
W : C
h : W ⟶ X
inst✝ : Epi h
hfg : Exact (h ≫ f) g
hc : IsColimit
  (CokernelCofork.ofπ (Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0)) :=
  isCokernelOfComp h (h ≫ f) (colimit.isColimit (parallelPair (h ≫ f) 0))
    (_ : f ≫ Cofork.π (colimit.cocone (parallelPair (h ≫ f) 0)) = 0) (_ : h ≫ f = h ≫ f)
⊢ h ≫ f ≫ g = 0
Theorem: Finset.mem_disjSups
File: Mathlib/Data/Finset/Sups.lean

tactic: simp [disjSups, and_assoc]
state_before: α : Type u_1
inst✝³ : DecidableEq α
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableRel Disjoint
s s₁ s₂ t t₁ t₂ u : Finset α
a b c : α
⊢ c ∈ s ○ t ↔ ∃ a, a ∈ s ∧ ∃ b, b ∈ t ∧ Disjoint a b ∧ a ⊔ b = c
Theorem: NormedRing.inverse_add_norm_diff_second_order
File: Mathlib/Analysis/NormedSpace/Units.lean

tactic: convert inverse_add_norm_diff_nth_order x 2 using 2
state_before: R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
⊢ (fun t => inverse (↑x + t) - ↑x⁻¹ + ↑x⁻¹ * t * ↑x⁻¹) =O[𝓝 0] fun t => ‖t‖ ^ 2

tactic: simp only [sum_range_succ, sum_range_zero, zero_add, pow_zero, pow_one, add_mul, one_mul,
  ← sub_sub, neg_mul, sub_neg_eq_add]
state_before: case h.e'_7.h
R : Type u_1
inst✝¹ : NormedRing R
inst✝ : CompleteSpace R
x : Rˣ
x✝ : R
⊢ inverse (↑x + x✝) - ↑x⁻¹ + ↑x⁻¹ * x✝ * ↑x⁻¹ = inverse (↑x + x✝) - (∑ i in range 2, (-↑x⁻¹ * x✝) ^ i) * ↑x⁻¹
Theorem: Polynomial.map_expand_pow_char
File: Mathlib/Data/Polynomial/Expand.lean

tactic: induction' n with _ n_ih
state_before: R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : CharP R p
hp : Fact (Nat.Prime p)
f : R[X]
n : ℕ
⊢ map (frobenius R p ^ n) (↑(expand R (p ^ n)) f) = f ^ p ^ n

tactic: symm
state_before: case succ
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : CharP R p
hp : Fact (Nat.Prime p)
f : R[X]
n✝ : ℕ
n_ih : map (frobenius R p ^ n✝) (↑(expand R (p ^ n✝)) f) = f ^ p ^ n✝
⊢ map (frobenius R p ^ Nat.succ n✝) (↑(expand R (p ^ Nat.succ n✝)) f) = f ^ p ^ Nat.succ n✝

tactic: rw [pow_succ', pow_mul, ← n_ih, ← expand_char, pow_succ, RingHom.mul_def, ← map_map, mul_comm,
  expand_mul, ← map_expand]
state_before: case succ
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : CharP R p
hp : Fact (Nat.Prime p)
f : R[X]
n✝ : ℕ
n_ih : map (frobenius R p ^ n✝) (↑(expand R (p ^ n✝)) f) = f ^ p ^ n✝
⊢ f ^ p ^ Nat.succ n✝ = map (frobenius R p ^ Nat.succ n✝) (↑(expand R (p ^ Nat.succ n✝)) f)

tactic: simp [RingHom.one_def]
state_before: case zero
R : Type u
inst✝² : CommSemiring R
S : Type v
inst✝¹ : CommSemiring S
p q : ℕ
inst✝ : CharP R p
hp : Fact (Nat.Prime p)
f : R[X]
⊢ map (frobenius R p ^ Nat.zero) (↑(expand R (p ^ Nat.zero)) f) = f ^ p ^ Nat.zero
Theorem: affineIndependent_iff_not_collinear_set
File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

tactic: rw [affineIndependent_iff_not_collinear]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.277216
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ : P
⊢ AffineIndependent k ![p₁, p₂, p₃] ↔ ¬Collinear k {p₁, p₂, p₃}

tactic: simp_rw [Matrix.range_cons, Matrix.range_empty, Set.singleton_union, insert_emptyc_eq]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
ι : Type ?u.277216
inst✝³ : DivisionRing k
inst✝² : AddCommGroup V
inst✝¹ : Module k V
inst✝ : AffineSpace V P
p₁ p₂ p₃ : P
⊢ ¬Collinear k (Set.range ![p₁, p₂, p₃]) ↔ ¬Collinear k {p₁, p₂, p₃}
Theorem: Nat.ModEq.mul_right'
File: Mathlib/Data/Nat/ModEq.lean

tactic: rw [mul_comm a, mul_comm b, mul_comm n]
state_before: m n a b c✝ d c : ℕ
h : a ≡ b [MOD n]
⊢ a * c ≡ b * c [MOD n * c]

tactic: exact h.mul_left' c
state_before: m n a b c✝ d c : ℕ
h : a ≡ b [MOD n]
⊢ c * a ≡ c * b [MOD c * n]
Theorem: CategoryTheory.Idempotents.Karoubi.comp_f
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

tactic: rfl
state_before: C : Type u_1
inst✝ : Category C
P Q R : Karoubi C
f : P ⟶ Q
g : Q ⟶ R
⊢ (f ≫ g).f = f.f ≫ g.f
Theorem: Compactum.basic_inter
File: Mathlib/Topology/Category/Compactum.lean

tactic: ext G
state_before: X : Compactum
A B : Set X.A
⊢ Compactum.basic (A ∩ B) = Compactum.basic A ∩ Compactum.basic B

tactic: constructor
state_before: case h
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
⊢ G ∈ Compactum.basic (A ∩ B) ↔ G ∈ Compactum.basic A ∩ Compactum.basic B

tactic: intro hG
state_before: case h.mp
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
⊢ G ∈ Compactum.basic (A ∩ B) → G ∈ Compactum.basic A ∩ Compactum.basic B

tactic: constructor <;> filter_upwards [hG]with _
state_before: case h.mp
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
hG : G ∈ Compactum.basic (A ∩ B)
⊢ G ∈ Compactum.basic A ∩ Compactum.basic B

tactic: exacts [And.left, And.right]
state_before: case h
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
hG : G ∈ Compactum.basic (A ∩ B)
a✝ : X.A
⊢ a✝ ∈ A ∩ B → a✝ ∈ A

case h
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
hG : G ∈ Compactum.basic (A ∩ B)
a✝ : X.A
⊢ a✝ ∈ A ∩ B → a✝ ∈ B

tactic: rintro ⟨h1, h2⟩
state_before: case h.mpr
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
⊢ G ∈ Compactum.basic A ∩ Compactum.basic B → G ∈ Compactum.basic (A ∩ B)

tactic: exact inter_mem h1 h2
state_before: case h.mpr.intro
X : Compactum
A B : Set X.A
G : Ultrafilter X.A
h1 : G ∈ Compactum.basic A
h2 : G ∈ Compactum.basic B
⊢ G ∈ Compactum.basic (A ∩ B)
Theorem: Ring.inverse_zero
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: nontriviality
state_before: α : Type ?u.9084
M₀ : Type u_1
G₀ : Type ?u.9090
M₀' : Type ?u.9093
G₀' : Type ?u.9096
F : Type ?u.9099
F' : Type ?u.9102
inst✝ : MonoidWithZero M₀
⊢ inverse 0 = 0

tactic: exact inverse_non_unit _ not_isUnit_zero
state_before: α : Type ?u.9084
M₀ : Type u_1
G₀ : Type ?u.9090
M₀' : Type ?u.9093
G₀' : Type ?u.9096
F : Type ?u.9099
F' : Type ?u.9102
inst✝ : MonoidWithZero M₀
✝ : Nontrivial M₀
⊢ inverse 0 = 0
Theorem: TopologicalSpace.isOpen_sUnion_countable
File: Mathlib/Topology/Bases.lean

tactic: rwa [sUnion_image, sUnion_eq_iUnion]
state_before: α : Type u
t : TopologicalSpace α
inst✝ : SecondCountableTopology α
S : Set (Set α)
H : ∀ (s : Set α), s ∈ S → IsOpen s
T : Set ↑S
cT : Set.Countable T
hT : (⋃ (i : ↑S) (_ : i ∈ T), ↑i) = ⋃ (i : ↑S), ↑i
⊢ ⋃₀ (Subtype.val '' T) = ⋃₀ S
Theorem: FractionalIdeal.coe_spanSingleton
File: Mathlib/RingTheory/FractionalIdeal.lean

tactic: rw [spanSingleton]
state_before: R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1296088
inst✝³ : CommRing R₁
K : Type ?u.1296094
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : P
⊢ ↑(spanSingleton S x) = span R {x}

tactic: rfl
state_before: R : Type u_2
inst✝⁶ : CommRing R
S : Submonoid R
P : Type u_1
inst✝⁵ : CommRing P
inst✝⁴ : Algebra R P
loc : IsLocalization S P
R₁ : Type ?u.1296088
inst✝³ : CommRing R₁
K : Type ?u.1296094
inst✝² : Field K
inst✝¹ : Algebra R₁ K
inst✝ : IsFractionRing R₁ K
x : P
⊢ ↑{ val := span R {x}, property := (_ : IsFractional S (span R {x})) } = span R {x}
Theorem: AntilipschitzWith.of_subsingleton
File: Mathlib/Topology/MetricSpace/Antilipschitz.lean

tactic: simp only [Subsingleton.elim x y, edist_self, zero_le]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.14379
inst✝³ : PseudoEMetricSpace α
inst✝² : PseudoEMetricSpace β
inst✝¹ : PseudoEMetricSpace γ
K✝ : ℝ≥0
f : α → β
inst✝ : Subsingleton α
K : ℝ≥0
x y : α
⊢ edist x y ≤ ↑K * edist (f x) (f y)
Theorem: Real.sin_zero
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sin]
state_before: x y : ℝ
⊢ sin 0 = 0
Theorem: toIocDiv_neg
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [← neg_neg b, toIcoDiv_neg, neg_neg, neg_neg, neg_add', neg_neg, add_sub_cancel]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIocDiv hp a (-b) = -(toIcoDiv hp (-a) b + 1)
Theorem: SimpleGraph.Colorable.mono
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

tactic: simp [h]
state_before: V : Type u
G : SimpleGraph V
α : Type v
C : Coloring G α
n m : ℕ
h : n ≤ m
hc : Colorable G n
⊢ Fintype.card (Fin n) ≤ Fintype.card (Fin m)
Theorem: Polynomial.Monic.natDegree_mul_comm
File: Mathlib/Data/Polynomial/Monic.lean

tactic: by_cases h : q = 0
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
⊢ natDegree (p * q) = natDegree (q * p)

tactic: rw [hp.natDegree_mul' h, Polynomial.natDegree_mul', add_comm]
state_before: case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : ¬q = 0
⊢ natDegree (p * q) = natDegree (q * p)

tactic: simpa [hp.leadingCoeff, leadingCoeff_ne_zero]
state_before: case neg
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : ¬q = 0
⊢ Polynomial.leadingCoeff q * Polynomial.leadingCoeff p ≠ 0

tactic: simp [h]
state_before: case pos
R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q✝ r : R[X]
hp : Monic p
q : R[X]
h : q = 0
⊢ natDegree (p * q) = natDegree (q * p)
Theorem: Int.smul_one_eq_coe
File: Mathlib/Algebra/Module/Basic.lean

tactic: rw [zsmul_eq_mul, mul_one]
state_before: α : Type ?u.325888
R✝ : Type ?u.325891
k : Type ?u.325894
S : Type ?u.325897
M : Type ?u.325900
M₂ : Type ?u.325903
M₃ : Type ?u.325906
ι : Type ?u.325909
R : Type u_1
inst✝ : Ring R
m : ℤ
⊢ m • 1 = ↑m
Theorem: Finset.forall_mem_map
File: Mathlib/Data/Finset/Image.lean

tactic: obtain ⟨y, hy, rfl⟩ := mem_map.1 hx
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.6251
f✝ : α ↪ β
s✝ : Finset α
f : α ↪ β
s : Finset α
p : (a : β) → a ∈ map f s → Prop
h : ∀ (x : α) (H : x ∈ s), p (↑f x) (_ : ↑f x ∈ map f s)
x : β
hx : x ∈ map f s
⊢ p x hx

tactic: exact h _ hy
state_before: case intro.intro
α : Type u_1
β : Type u_2
γ : Type ?u.6251
f✝ : α ↪ β
s✝ : Finset α
f : α ↪ β
s : Finset α
p : (a : β) → a ∈ map f s → Prop
h : ∀ (x : α) (H : x ∈ s), p (↑f x) (_ : ↑f x ∈ map f s)
y : α
hy : y ∈ s
hx : ↑f y ∈ map f s
⊢ p (↑f y) hx
Theorem: toIcoMod_sub_self
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: rw [toIcoMod, sub_sub_cancel_left, neg_smul]
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c : α
n : ℤ
a b : α
⊢ toIcoMod hp a b - b = -toIcoDiv hp a b • p
Theorem: ClosedEmbedding.compactSpace
File: Mathlib/Topology/SubsetProperties.lean

tactic: rw [← hf.toInducing.isCompact_iff, image_univ]
state_before: α : Type u
β : Type v
ι : Type ?u.96598
π : ι → Type ?u.96603
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
h : CompactSpace β
f : α → β
hf : ClosedEmbedding f
⊢ IsCompact univ

tactic: exact hf.closed_range.isCompact
state_before: α : Type u
β : Type v
ι : Type ?u.96598
π : ι → Type ?u.96603
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalSpace β
s t : Set α
h : CompactSpace β
f : α → β
hf : ClosedEmbedding f
⊢ IsCompact (range f)
Theorem: Multiset.mem_singleton_self
File: Mathlib/Data/Multiset/Basic.lean

tactic: rw [← cons_zero]
state_before: α : Type u_1
β : Type ?u.25331
γ : Type ?u.25334
a : α
⊢ a ∈ {a}

tactic: exact mem_cons_self _ _
state_before: α : Type u_1
β : Type ?u.25331
γ : Type ?u.25334
a : α
⊢ a ∈ a ::ₘ 0
Theorem: Finsupp.mapRange.addMonoidHom_comp
File: Mathlib/Data/Finsupp/Basic.lean

tactic: simp only [comp_apply, map_zero]
state_before: α : Type u_4
β : Type ?u.49269
γ : Type ?u.49272
ι : Type ?u.49275
M : Type u_3
M' : Type ?u.49281
N : Type u_1
P : Type u_2
G : Type ?u.49290
H : Type ?u.49293
R : Type ?u.49296
S : Type ?u.49299
inst✝² : AddCommMonoid M
inst✝¹ : AddCommMonoid N
inst✝ : AddCommMonoid P
f : N →+ P
f₂ : M →+ N
⊢ (↑f ∘ ↑f₂) 0 = 0
Theorem: maximals_singleton
File: Mathlib/Order/Minimal.lean

tactic: rintro b (rfl : b = a)
state_before: α : Type u_1
r r₁ r₂ : α → α → Prop
s t : Set α
a b : α
⊢ ∀ ⦃b : α⦄, b ∈ {a} → r a b → r b a

tactic: exact id
state_before: α : Type u_1
r r₁ r₂ : α → α → Prop
s t : Set α
b✝ b : α
⊢ r b b → r b b
Theorem: PNat.XgcdType.finish_isSpecial
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [IsSpecial, finish] at hs⊢
state_before: u : XgcdType
hs : IsSpecial u
⊢ IsSpecial (finish u)

tactic: rw [add_mul _ _ u.y, add_comm _ (u.x * u.y), ← hs]
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * qp u + u.zp) + u.wp * (u.y * qp u + u.zp) = ((u.wp + 1) * qp u + u.x) * u.y

tactic: ring
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * qp u + u.zp) + u.wp * (u.y * qp u + u.zp) = u.wp + u.zp + u.wp * u.zp + (u.wp + 1) * qp u * u.y
Theorem: Set.Countable.biUnion_iff
File: Mathlib/Data/Set/Countable.lean

tactic: haveI := hs.to_subtype
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
t : (a : α) → a ∈ s → Set β
hs : Set.Countable s
⊢ Set.Countable (⋃ (a : α) (h : a ∈ s), t a h) ↔ ∀ (a : α) (ha : a ∈ s), Set.Countable (t a ha)

tactic: rw [biUnion_eq_iUnion, countable_iUnion_iff, SetCoe.forall']
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
s : Set α
t : (a : α) → a ∈ s → Set β
hs : Set.Countable s
this : Countable ↑s
⊢ Set.Countable (⋃ (a : α) (h : a ∈ s), t a h) ↔ ∀ (a : α) (ha : a ∈ s), Set.Countable (t a ha)
Theorem: Finset.card_le_one_iff_subset_singleton
File: Mathlib/Data/Finset/Card.lean

tactic: refine' ⟨fun H => _, _⟩
state_before: α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
⊢ card s ≤ 1 ↔ ∃ x, s ⊆ {x}

tactic: obtain rfl | ⟨x, hx⟩ := s.eq_empty_or_nonempty
state_before: case refine'_1
α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
H : card s ≤ 1
⊢ ∃ x, s ⊆ {x}

tactic: exact ⟨Classical.arbitrary α, empty_subset _⟩
state_before: case refine'_1.inl
α : Type u_1
β : Type ?u.54709
t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
H : card ∅ ≤ 1
⊢ ∃ x, ∅ ⊆ {x}

tactic: exact ⟨x, fun y hy => by rw [card_le_one.1 H y hy x hx, mem_singleton]⟩
state_before: case refine'_1.inr.intro
α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
H : card s ≤ 1
x : α
hx : x ∈ s
⊢ ∃ x, s ⊆ {x}

tactic: rw [card_le_one.1 H y hy x hx, mem_singleton]
state_before: α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
H : card s ≤ 1
x : α
hx : x ∈ s
y : α
hy : y ∈ s
⊢ y ∈ {x}

tactic: rintro ⟨x, hx⟩
state_before: case refine'_2
α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
⊢ (∃ x, s ⊆ {x}) → card s ≤ 1

tactic: rw [← card_singleton x]
state_before: case refine'_2.intro
α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
x : α
hx : s ⊆ {x}
⊢ card s ≤ 1

tactic: exact card_le_of_subset hx
state_before: case refine'_2.intro
α : Type u_1
β : Type ?u.54709
s t : Finset α
f : α → β
n : ℕ
inst✝ : Nonempty α
x : α
hx : s ⊆ {x}
⊢ card s ≤ card {x}
Theorem: PartENat.add_lt_add_right
File: Mathlib/Data/Nat/PartENat.lean

tactic: rcases ne_top_iff.mp (ne_top_of_lt h) with ⟨m, rfl⟩
state_before: x y z : PartENat
h : x < y
hz : z ≠ ⊤
⊢ x + z < y + z

tactic: rcases ne_top_iff.mp hz with ⟨k, rfl⟩
state_before: case intro
y z : PartENat
hz : z ≠ ⊤
m : ℕ
h : ↑m < y
⊢ ↑m + z < y + z

tactic: induction' y using PartENat.casesOn with n
state_before: case intro.intro
y : PartENat
m : ℕ
h : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
⊢ ↑m + ↑k < y + ↑k

tactic: norm_cast at h
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : ↑m < ↑n
⊢ ↑m + ↑k < ↑n + ↑k

tactic: norm_cast
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ ↑m + ↑k < ↑n + ↑k

tactic: apply add_lt_add_right h
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
n : ℕ
h : m < n
⊢ m + k < n + k

tactic: rw [top_add]
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤ + ↑k

tactic: norm_cast
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑m + ↑k < ⊤

tactic: apply natCast_lt_top
state_before: case intro.intro.a
y : PartENat
m : ℕ
h✝ : ↑m < y
k : ℕ
hz : ↑k ≠ ⊤
h : ↑m < ⊤
⊢ ↑(m + k) < ⊤
Theorem: SimpleGraph.hasse_preconnected_of_succ
File: Mathlib/Combinatorics/SimpleGraph/Hasse.lean

tactic: rw [reachable_iff_reflTransGen]
state_before: α : Type u_1
β : Type ?u.5179
inst✝² : LinearOrder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a b : α
⊢ Reachable (hasse α) a b

tactic: exact
  reflTransGen_of_succ _ (fun c hc => Or.inl <| covby_succ_of_not_isMax hc.2.not_isMax)
    fun c hc => Or.inr <| covby_succ_of_not_isMax hc.2.not_isMax
state_before: α : Type u_1
β : Type ?u.5179
inst✝² : LinearOrder α
inst✝¹ : SuccOrder α
inst✝ : IsSuccArchimedean α
a b : α
⊢ ReflTransGen (hasse α).Adj a b
Theorem: List.pairwise_append
File: Std/Data/List/Lemmas.lean

tactic: induction l₁ <;> simp [*, or_imp, forall_and, and_assoc, and_left_comm]
state_before: α : Type u_1
R : α → α → Prop
l₁ l₂ : List α
⊢ Pairwise R (l₁ ++ l₂) ↔ Pairwise R l₁ ∧ Pairwise R l₂ ∧ ∀ (a : α), a ∈ l₁ → ∀ (b : α), b ∈ l₂ → R a b
Theorem: LinearEquiv.fst_comp_prodComm
File: Mathlib/LinearAlgebra/Prod.lean

tactic: ext <;> simp
state_before: N : Type u_1
R : Type u
K : Type u'
M : Type v
V : Type v'
M₂ : Type w
V₂ : Type w'
M₃ : Type y
V₃ : Type y'
M₄ : Type z
ι : Type x
M₅ : Type ?u.401591
M₆ : Type ?u.401594
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : AddCommMonoid N
inst✝¹ : Module R M
inst✝ : Module R N
⊢ LinearMap.comp (LinearMap.fst R N M) ↑(prodComm R M N) = LinearMap.snd R M N