tasksource/leandojo huggingface dataset:
Theorem: Metric.hausdorffDist_triangle'
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

tactic: rw [hausdorffEdist_comm] at fin
state_before: ι : Sort ?u.84126
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
fin : hausdorffEdist t u ≠ ⊤
⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u

tactic: have I : hausdorffDist u s ≤ hausdorffDist u t + hausdorffDist t s :=
  hausdorffDist_triangle fin
state_before: ι : Sort ?u.84126
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
fin : hausdorffEdist u t ≠ ⊤
⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u

tactic: simpa [add_comm, hausdorffDist_comm] using I
state_before: ι : Sort ?u.84126
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
fin : hausdorffEdist u t ≠ ⊤
I : hausdorffDist u s ≤ hausdorffDist u t + hausdorffDist t s
⊢ hausdorffDist s u ≤ hausdorffDist s t + hausdorffDist t u
Theorem: Finsupp.restrictDom_comp_subtype
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: ext (l a)
state_before: α : Type u_1
M : Type u_2
N : Type ?u.73225
P : Type ?u.73228
R : Type u_3
S : Type ?u.73234
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s : Set α
⊢ comp (restrictDom M R s) (Submodule.subtype (supported M R s)) = LinearMap.id

tactic: by_cases h : a ∈ s <;> simp [h]
state_before: case h.a.h
α : Type u_1
M : Type u_2
N : Type ?u.73225
P : Type ?u.73228
R : Type u_3
S : Type ?u.73234
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s : Set α
l : { x // x ∈ supported M R s }
a : α
⊢ ↑↑(↑(comp (restrictDom M R s) (Submodule.subtype (supported M R s))) l) a = ↑↑(↑LinearMap.id l) a

tactic: exact ((mem_supported' R l.1).1 l.2 a h).symm
state_before: case neg
α : Type u_1
M : Type u_2
N : Type ?u.73225
P : Type ?u.73228
R : Type u_3
S : Type ?u.73234
inst✝⁷ : Semiring R
inst✝⁶ : Semiring S
inst✝⁵ : AddCommMonoid M
inst✝⁴ : Module R M
inst✝³ : AddCommMonoid N
inst✝² : Module R N
inst✝¹ : AddCommMonoid P
inst✝ : Module R P
s : Set α
l : { x // x ∈ supported M R s }
a : α
h : ¬a ∈ s
⊢ 0 = ↑↑l a
Theorem: List.alternatingProd_reverse
File: Mathlib/Data/List/BigOperators/Lemmas.lean

tactic: simp only [alternatingProd_nil, one_zpow, reverse_nil]
state_before: ι : Type ?u.19288
α : Type u_1
M : Type ?u.19294
N : Type ?u.19297
P : Type ?u.19300
M₀ : Type ?u.19303
G : Type ?u.19306
R : Type ?u.19309
inst✝ : CommGroup α
⊢ alternatingProd (reverse []) = alternatingProd [] ^ (-1) ^ (length [] + 1)

tactic: simp_rw [reverse_cons, alternatingProd_append, alternatingProd_reverse,
  alternatingProd_singleton, alternatingProd_cons, length_reverse, length, pow_succ, neg_mul,
  one_mul, zpow_neg, inv_inv]
state_before: ι : Type ?u.19288
α : Type u_1
M : Type ?u.19294
N : Type ?u.19297
P : Type ?u.19300
M₀ : Type ?u.19303
G : Type ?u.19306
R : Type ?u.19309
inst✝ : CommGroup α
a : α
l : List α
⊢ alternatingProd (reverse (a :: l)) = alternatingProd (a :: l) ^ (-1) ^ (length (a :: l) + 1)

tactic: rw [mul_comm, ← div_eq_mul_inv, div_zpow]
state_before: ι : Type ?u.19288
α : Type u_1
M : Type ?u.19294
N : Type ?u.19297
P : Type ?u.19300
M₀ : Type ?u.19303
G : Type ?u.19306
R : Type ?u.19309
inst✝ : CommGroup α
a : α
l : List α
⊢ (alternatingProd l ^ (-1) ^ length l)⁻¹ * a ^ (-1) ^ length l = (a / alternatingProd l) ^ (-1) ^ length l
Theorem: CategoryTheory.FunctorToTypes.map_id_apply
File: Mathlib/CategoryTheory/Types.lean

tactic: simp [types_id]
state_before: C : Type u
inst✝ : Category C
F G H : C ⥤ Type w
X Y Z : C
σ : F ⟶ G
τ : G ⟶ H
a : F.obj X
⊢ F.map (𝟙 X) a = a
Theorem: TensorProduct.dualDistribInvOfBasis_apply
File: Mathlib/LinearAlgebra/Dual.lean

tactic: simp [dualDistribInvOfBasis]
state_before: R : Type u_2
M : Type u_3
N : Type u_5
ι : Type u_1
κ : Type u_4
inst✝⁸ : DecidableEq ι
inst✝⁷ : DecidableEq κ
inst✝⁶ : Fintype ι
inst✝⁵ : Fintype κ
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
b : Basis ι R M
c : Basis κ R N
f : Dual R (M ⊗[R] N)
⊢ ↑(dualDistribInvOfBasis b c) f =
    ∑ i : ι, ∑ j : κ, ↑f (↑b i ⊗ₜ[R] ↑c j) • ↑(Basis.dualBasis b) i ⊗ₜ[R] ↑(Basis.dualBasis c) j
Theorem: Polynomial.degree_pos_induction_on
File: Mathlib/Data/Polynomial/Inductions.lean

tactic: rw [degree_zero] at h
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝ q : R[X]
P : R[X] → Prop
p : R[X]
h0 : 0 < degree p
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
h : 0 < degree 0
⊢ P 0

tactic: exact absurd h (by decide)
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝ q : R[X]
P : R[X] → Prop
p : R[X]
h0 : 0 < degree p
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
h : 0 < ⊥
⊢ P 0

tactic: decide
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝ q : R[X]
P : R[X] → Prop
p : R[X]
h0 : 0 < degree p
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
h : 0 < ⊥
⊢ ¬0 < ⊥

tactic: rwa [eq_C_of_degree_le_zero h, ← C_add] at h0
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a✝ b : R
n : ℕ
inst✝ : Semiring R
p✝¹ q : R[X]
P : R[X] → Prop
p✝ : R[X]
h0✝ : 0 < degree p✝
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
p : R[X]
a : R
x✝¹ : coeff p 0 = 0
x✝ : a ≠ 0
ih : 0 < degree p → P p
h0 : 0 < degree (p + ↑C a)
h : 0 ≥ degree p
⊢ 0 < degree (↑C (?m.236563 p a x✝¹ x✝ ih h0 h))

tactic: rw [eq_C_of_degree_le_zero (le_of_not_gt h0)] at h0' ⊢
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝¹ q : R[X]
P : R[X] → Prop
p✝ : R[X]
h0✝ : 0 < degree p✝
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
p : R[X]
x✝ : p ≠ 0
ih : 0 < degree p → P p
h0' : 0 < degree (p * X)
h0 : ¬0 < degree p
⊢ P (p * X)

tactic: exact hC fun h : coeff p 0 = 0 => by simp [h, Nat.not_lt_zero] at h0'
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝¹ q : R[X]
P : R[X] → Prop
p✝ : R[X]
h0✝ : 0 < degree p✝
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
p : R[X]
x✝ : p ≠ 0
ih : 0 < degree p → P p
h0' : 0 < degree (↑C (coeff p 0) * X)
h0 : ¬0 < degree p
⊢ P (↑C (coeff p 0) * X)

tactic: simp [h, Nat.not_lt_zero] at h0'
state_before: R : Type u
S : Type v
T : Type w
A : Type z
a b : R
n : ℕ
inst✝ : Semiring R
p✝¹ q : R[X]
P : R[X] → Prop
p✝ : R[X]
h0✝ : 0 < degree p✝
hC : ∀ {a : R}, a ≠ 0 → P (↑C a * X)
hX : ∀ {p : R[X]}, 0 < degree p → P p → P (p * X)
hadd : ∀ {p : R[X]} {a : R}, 0 < degree p → P p → P (p + ↑C a)
p : R[X]
x✝ : p ≠ 0
ih : 0 < degree p → P p
h0' : 0 < degree (↑C (coeff p 0) * X)
h0 : ¬0 < degree p
h : coeff p 0 = 0
⊢ False
Theorem: Finset.forall_image₂_iff
File: Mathlib/Data/Finset/NAry.lean

tactic: simp_rw [← mem_coe, coe_image₂, forall_image2_iff]
state_before: α : Type u_2
α' : Type ?u.16668
β : Type u_3
β' : Type ?u.16674
γ : Type u_1
γ' : Type ?u.16680
δ : Type ?u.16683
δ' : Type ?u.16686
ε : Type ?u.16689
ε' : Type ?u.16692
ζ : Type ?u.16695
ζ' : Type ?u.16698
ν : Type ?u.16701
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 : γ
p : γ → Prop
⊢ (∀ (z : γ), z ∈ image₂ f s t → p z) ↔ ∀ (x : α), x ∈ s → ∀ (y : β), y ∈ t → p (f x y)
Theorem: List.map_tail
File: Mathlib/Data/List/Basic.lean

tactic: cases l <;> rfl
state_before: ι : Type ?u.135547
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ : List α
f : α → β
l : List α
⊢ map f (tail l) = tail (map f l)
Theorem: MultilinearMap.map_sub
File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

tactic: rw [sub_eq_add_neg, sub_eq_add_neg, MultilinearMap.map_add, map_neg]
state_before: R : Type u
ι : Type u'
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁵ : Semiring R
inst✝⁴ : (i : ι) → AddCommGroup (M₁ i)
inst✝³ : AddCommGroup M₂
inst✝² : (i : ι) → Module R (M₁ i)
inst✝¹ : Module R M₂
f : MultilinearMap R M₁ M₂
inst✝ : DecidableEq ι
m : (i : ι) → M₁ i
i : ι
x y : M₁ i
⊢ ↑f (update m i (x - y)) = ↑f (update m i x) - ↑f (update m i y)
Theorem: PowerSeries.coeff_order
File: Mathlib/RingTheory/PowerSeries/Basic.lean

tactic: simp only [order, order_finite_iff_ne_zero.mp h, not_false_iff, dif_neg, PartENat.get_natCast']
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
h : (order φ).Dom
⊢ ↑(coeff R (Part.get (order φ) h)) φ ≠ 0

tactic: generalize_proofs h
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
h : (order φ).Dom
⊢ ↑(coeff R (Nat.find (_ : ∃ n, ↑(coeff R n) φ ≠ 0))) φ ≠ 0

tactic: exact Nat.find_spec h
state_before: R : Type u_1
inst✝ : Semiring R
φ : PowerSeries R
h✝ : (order φ).Dom
h : ∃ n, ↑(coeff R n) φ ≠ 0
⊢ ↑(coeff R (Nat.find h)) φ ≠ 0
Theorem: Real.deriv_arccos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/InverseDeriv.lean

tactic: simp only [deriv_arcsin]
state_before: x : ℝ
⊢ -deriv (fun y => arcsin y) x = -(1 / sqrt (1 - x ^ 2))
Theorem: Cardinal.lift_two
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: simp [←one_add_one_eq_two]
state_before: α β : Type u
⊢ lift 2 = 2
Theorem: Equiv.Perm.support_one
File: Mathlib/GroupTheory/Perm/Support.lean

tactic: rw [support_eq_empty_iff]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f g : Perm α
⊢ support 1 = ∅
Theorem: Nat.Linear.Poly.denote_reverse
File: src/lean/Init/Data/Nat/Linear.lean

tactic: simp [List.reverse]
state_before: ctx : Context
p : Poly
⊢ denote ctx (List.reverse p) = denote ctx p
Theorem: Multiset.Nodup.sigma
File: Mathlib/Data/Multiset/Nodup.lean

tactic: choose f hf using fun a => Quotient.exists_rep (t a)
state_before: α : Type u_2
β : Type ?u.9365
γ : Type ?u.9368
r : α → α → Prop
s t✝ : Multiset α
a : α
σ : α → Type u_1
t : (a : α) → Multiset (σ a)
l₁ : List α
⊢ Nodup (Quot.mk Setoid.r l₁) → (∀ (a : α), Nodup (t a)) → Nodup (Multiset.sigma (Quot.mk Setoid.r l₁) t)

tactic: simpa [←funext hf] using List.Nodup.sigma
state_before: α : Type u_2
β : Type ?u.9365
γ : Type ?u.9368
r : α → α → Prop
s t✝ : Multiset α
a : α
σ : α → Type u_1
t : (a : α) → Multiset (σ a)
l₁ : List α
f : (a : α) → List (σ a)
hf : ∀ (a : α), Quotient.mk (isSetoid (σ a)) (f a) = t a
⊢ Nodup (Quot.mk Setoid.r l₁) → (∀ (a : α), Nodup (t a)) → Nodup (Multiset.sigma (Quot.mk Setoid.r l₁) t)
Theorem: Set.mem_accumulate
File: Mathlib/Data/Set/Accumulate.lean

tactic: simp_rw [accumulate_def, mem_iUnion₂, exists_prop]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.214
s : α → Set β
t : α → Set γ
inst✝ : LE α
x : α
z : β
⊢ z ∈ Accumulate s x ↔ ∃ y, y ≤ x ∧ z ∈ s y
Theorem: Ideal.coeff_zero_mem_comap_of_root_mem_of_eval_mem
File: Mathlib/RingTheory/Ideal/Over.lean

tactic: rw [← p.divX_mul_X_add, eval₂_add, eval₂_C, eval₂_mul, eval₂_X] at hp
state_before: R : Type u_2
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r p ∈ I
⊢ coeff p 0 ∈ comap f I

tactic: refine' mem_comap.mpr ((I.add_mem_iff_right _).mp hp)
state_before: R : Type u_2
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r (divX p) * r + ↑f (coeff p 0) ∈ I
⊢ coeff p 0 ∈ comap f I

tactic: exact I.mul_mem_left _ hr
state_before: R : Type u_2
inst✝¹ : CommRing R
S : Type u_1
inst✝ : CommRing S
f : R →+* S
I J : Ideal S
r : S
hr : r ∈ I
p : R[X]
hp : eval₂ f r (divX p) * r + ↑f (coeff p 0) ∈ I
⊢ eval₂ f r (divX p) * r ∈ I
Theorem: StructureGroupoid.liftPropOn_univ
File: Mathlib/Geometry/Manifold/LocalInvariantProperties.lean

tactic: simp [LiftPropOn, LiftProp, LiftPropAt]
state_before: H : Type u_1
M : Type u_2
H' : Type u_3
M' : Type u_4
X : Type ?u.12254
inst✝⁶ : TopologicalSpace H
inst✝⁵ : TopologicalSpace M
inst✝⁴ : ChartedSpace H M
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
inst✝¹ : ChartedSpace H' M'
inst✝ : TopologicalSpace X
G : StructureGroupoid H
G' : StructureGroupoid H'
e e' : LocalHomeomorph M H
f f' : LocalHomeomorph M' H'
P : (H → H') → Set H → H → Prop
g g' : M → M'
s t : Set M
x : M
Q : (H → H) → Set H → H → Prop
⊢ LiftPropOn P g univ ↔ LiftProp P g
Theorem: PadicInt.exists_pow_neg_lt
File: Mathlib/NumberTheory/Padics/PadicIntegers.lean

tactic: obtain ⟨k, hk⟩ := exists_nat_gt ε⁻¹
state_before: p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
⊢ ∃ k, ↑p ^ (-↑k) < ε

tactic: use k
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ ∃ k, ↑p ^ (-↑k) < ε

tactic: rw [← inv_lt_inv hε (_root_.zpow_pos_of_pos _ _)]
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ ↑p ^ (-↑k) < ε

tactic: rw [zpow_neg, inv_inv, zpow_ofNat]
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ ε⁻¹ < (↑p ^ (-↑k))⁻¹

tactic: apply lt_of_lt_of_le hk
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ ε⁻¹ < ↑p ^ k

tactic: norm_cast
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ ↑k ≤ ↑p ^ k

tactic: apply le_of_lt
state_before: case intro
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ k ≤ p ^ k

tactic: convert Nat.lt_pow_self _ _ using 1
state_before: case intro.a
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ k < p ^ k

tactic: exact hp.1.one_lt
state_before: case intro.a.convert_2
p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ 1 < p

tactic: exact_mod_cast hp.1.pos
state_before: p : ℕ
hp : Fact (Nat.Prime p)
ε : ℝ
hε : 0 < ε
k : ℕ
hk : ε⁻¹ < ↑k
⊢ 0 < ↑p
Theorem: AdjoinRoot.of.injective_of_degree_ne_zero
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [injective_iff_map_eq_zero]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
⊢ Function.Injective ↑(of f)

tactic: intro p hp
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
⊢ ∀ (a : R), ↑(of f) a = 0 → a = 0

tactic: rw [AdjoinRoot.of, RingHom.comp_apply, AdjoinRoot.mk_eq_zero] at hp
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
p : R
hp : ↑(of f) p = 0
⊢ p = 0

tactic: by_cases h : f = 0
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
p : R
hp : f ∣ ↑C p
⊢ p = 0

tactic: exact C_eq_zero.mp (eq_zero_of_zero_dvd (by rwa [h] at hp))
state_before: case pos
R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
p : R
hp : f ∣ ↑C p
h : f = 0
⊢ p = 0

tactic: rwa [h] at hp
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
p : R
hp : f ∣ ↑C p
h : f = 0
⊢ 0 ∣ ↑C p

tactic: contrapose! hf with h_contra
state_before: case neg
R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
hf : degree f ≠ 0
p : R
hp : f ∣ ↑C p
h : ¬f = 0
⊢ p = 0

tactic: rw [← degree_C h_contra]
state_before: case neg
R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
p : R
hp : f ∣ ↑C p
h : ¬f = 0
h_contra : p ≠ 0
⊢ degree f = 0

tactic: apply le_antisymm (degree_le_of_dvd hp (by rwa [Ne.def, C_eq_zero])) _
state_before: case neg
R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
p : R
hp : f ∣ ↑C p
h : ¬f = 0
h_contra : p ≠ 0
⊢ degree f = degree (↑C p)

tactic: rwa [degree_C h_contra, zero_le_degree_iff]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
p : R
hp : f ∣ ↑C p
h : ¬f = 0
h_contra : p ≠ 0
⊢ degree (↑C p) ≤ degree f

tactic: rwa [Ne.def, C_eq_zero]
state_before: R : Type u
S : Type v
K : Type w
inst✝¹ : CommRing R
f : R[X]
inst✝ : IsDomain R
p : R
hp : f ∣ ↑C p
h : ¬f = 0
h_contra : p ≠ 0
⊢ ↑C p ≠ 0
Theorem: Polynomial.separable_X_add_C
File: Mathlib/FieldTheory/Separable.lean

tactic: rw [separable_def, derivative_add, derivative_X, derivative_C, add_zero]
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
a : R
⊢ Separable (X + ↑C a)

tactic: exact isCoprime_one_right
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
a : R
⊢ IsCoprime (X + ↑C a) 1
Theorem: JoinedIn.trans
File: Mathlib/Topology/PathConnected.lean

tactic: cases' hxy.mem with hx hy
state_before: X : Type u_1
Y : Type ?u.622850
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622865
F : Set X
hxy : JoinedIn F x y
hyz : JoinedIn F y z
⊢ JoinedIn F x z

tactic: cases' hyz.mem with hx hy
state_before: case intro
X : Type u_1
Y : Type ?u.622850
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622865
F : Set X
hxy : JoinedIn F x y
hyz : JoinedIn F y z
hx : x ∈ F
hy : y ∈ F
⊢ JoinedIn F x z

tactic: simp_all [joinedIn_iff_joined]
state_before: case intro.intro
X : Type u_1
Y : Type ?u.622850
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622865
F : Set X
hxy : JoinedIn F x y
hyz : JoinedIn F y z
hx✝ : x ∈ F
hy✝ hx : y ∈ F
hy : z ∈ F
⊢ JoinedIn F x z

tactic: exact hxy.trans hyz
state_before: case intro.intro
X : Type u_1
Y : Type ?u.622850
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
x y z : X
ι : Type ?u.622865
F : Set X
hx✝¹ : x ∈ F
hy✝¹ : y ∈ F
hy✝ : z ∈ F
hxy : Joined { val := x, property := (_ : x ∈ F) } { val := y, property := (_ : y ∈ F) }
hyz : Joined { val := y, property := (_ : y ∈ F) } { val := z, property := (_ : z ∈ F) }
hx✝ : x ∈ F
hx : y ∈ F
hy : z ∈ F
⊢ Joined { val := x, property := (_ : x ∈ F) } { val := z, property := (_ : z ∈ F) }
Theorem: Polynomial.toLaurent_C
File: Mathlib/Data/Polynomial/Laurent.lean

tactic: convert Polynomial.toLaurent_C_mul_T 0 r
state_before: R : Type u_1
inst✝ : Semiring R
r : R
⊢ ↑toLaurent (↑Polynomial.C r) = ↑C r

tactic: simp only [Int.ofNat_zero, T_zero, mul_one]
state_before: case h.e'_3
R : Type u_1
inst✝ : Semiring R
r : R
⊢ ↑C r = ↑C r * T ↑0
Theorem: mul_inv_le_iff
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [mul_comm, inv_mul_le_iff h]
state_before: ι : Type ?u.32669
α : Type u_1
β : Type ?u.32675
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
h : 0 < b
⊢ a * b⁻¹ ≤ c ↔ a ≤ b * c
Theorem: ZMod.ker_int_castRingHom
File: Mathlib/Data/ZMod/Basic.lean

tactic: ext
state_before: n : ℕ
⊢ RingHom.ker (Int.castRingHom (ZMod n)) = Ideal.span {↑n}

tactic: rw [Ideal.mem_span_singleton, RingHom.mem_ker, Int.coe_castRingHom, int_cast_zmod_eq_zero_iff_dvd]
state_before: case h
n : ℕ
x✝ : ℤ
⊢ x✝ ∈ RingHom.ker (Int.castRingHom (ZMod n)) ↔ x✝ ∈ Ideal.span {↑n}
Theorem: Matrix.zpow_bit0
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

tactic: cases' le_total 0 n with nonneg nonpos
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℤ
⊢ A ^ bit0 n = A ^ n * A ^ n

tactic: exact zpow_add_of_nonneg nonneg nonneg
state_before: case inl
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℤ
nonneg : 0 ≤ n
⊢ A ^ bit0 n = A ^ n * A ^ n

tactic: exact zpow_add_of_nonpos nonpos nonpos
state_before: case inr
n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
n : ℤ
nonpos : n ≤ 0
⊢ A ^ bit0 n = A ^ n * A ^ n
Theorem: FiberBundleCore.mem_localTrivAsLocalEquiv_target
File: Mathlib/Topology/FiberBundle/Basic.lean

tactic: erw [mem_prod]
state_before: ι : Type u_3
B : Type u_1
F : Type u_2
X : Type ?u.32284
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
p : B × F
⊢ p ∈ (localTrivAsLocalEquiv Z i).target ↔ p.fst ∈ baseSet Z i

tactic: simp only [and_true_iff, mem_univ]
state_before: ι : Type u_3
B : Type u_1
F : Type u_2
X : Type ?u.32284
inst✝² : TopologicalSpace X
inst✝¹ : TopologicalSpace B
inst✝ : TopologicalSpace F
Z : FiberBundleCore ι B F
i : ι
p : B × F
⊢ p.fst ∈ baseSet Z i ∧ p.snd ∈ univ ↔ p.fst ∈ baseSet Z i
Theorem: EquicontinuousAt.continuousAt
File: Mathlib/Topology/UniformSpace/Equicontinuity.lean

tactic: intro U hU
state_before: ι : Type u_1
κ : Type ?u.28015
X : Type u_2
Y : Type ?u.28021
Z : Type ?u.28024
α : Type u_3
β : Type ?u.28030
γ : Type ?u.28033
𝓕 : Type ?u.28036
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
F : ι → X → α
x₀ : X
h : EquicontinuousAt F x₀
i : ι
⊢ ContinuousAt (F i) x₀

tactic: rw [UniformSpace.mem_nhds_iff] at hU
state_before: ι : Type u_1
κ : Type ?u.28015
X : Type u_2
Y : Type ?u.28021
Z : Type ?u.28024
α : Type u_3
β : Type ?u.28030
γ : Type ?u.28033
𝓕 : Type ?u.28036
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
F : ι → X → α
x₀ : X
h : EquicontinuousAt F x₀
i : ι
U : Set α
hU : U ∈ 𝓝 (F i x₀)
⊢ U ∈ map (F i) (𝓝 x₀)

tactic: rcases hU with ⟨V, hV₁, hV₂⟩
state_before: ι : Type u_1
κ : Type ?u.28015
X : Type u_2
Y : Type ?u.28021
Z : Type ?u.28024
α : Type u_3
β : Type ?u.28030
γ : Type ?u.28033
𝓕 : Type ?u.28036
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
F : ι → X → α
x₀ : X
h : EquicontinuousAt F x₀
i : ι
U : Set α
hU : ∃ V, V ∈ 𝓤 α ∧ ball (F i x₀) V ⊆ U
⊢ U ∈ map (F i) (𝓝 x₀)

tactic: exact mem_map.mpr (mem_of_superset (h V hV₁) fun x hx => hV₂ (hx i))
state_before: case intro.intro
ι : Type u_1
κ : Type ?u.28015
X : Type u_2
Y : Type ?u.28021
Z : Type ?u.28024
α : Type u_3
β : Type ?u.28030
γ : Type ?u.28033
𝓕 : Type ?u.28036
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace Y
inst✝³ : TopologicalSpace Z
inst✝² : UniformSpace α
inst✝¹ : UniformSpace β
inst✝ : UniformSpace γ
F : ι → X → α
x₀ : X
h : EquicontinuousAt F x₀
i : ι
U : Set α
V : Set (α × α)
hV₁ : V ∈ 𝓤 α
hV₂ : ball (F i x₀) V ⊆ U
⊢ U ∈ map (F i) (𝓝 x₀)
Theorem: UniformGroup.ext
File: Mathlib/Topology/Algebra/UniformGroup.lean

tactic: rw [@uniformity_eq_comap_nhds_one _ u _ hu, @uniformity_eq_comap_nhds_one _ v _ hv, h]
state_before: α : Type ?u.165655
β : Type ?u.165658
inst✝³ : UniformSpace α
inst✝² : Group α
inst✝¹ : UniformGroup α
G : Type u_1
inst✝ : Group G
u v : UniformSpace G
hu : UniformGroup G
hv : UniformGroup G
h : 𝓝 1 = 𝓝 1
⊢ 𝓤 G = 𝓤 G
Theorem: symmDiff_triangle
File: Mathlib/Order/SymmDiff.lean

tactic: refine' (sup_le_sup (sdiff_triangle a b c) <| sdiff_triangle _ b _).trans_eq _
state_before: ι : Type ?u.34775
α : Type u_1
β : Type ?u.34781
π : ι → Type ?u.34786
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a ∆ c ≤ a ∆ b ⊔ b ∆ c

tactic: rw [@sup_comm _ _ (c \ b), sup_sup_sup_comm, symmDiff, symmDiff]
state_before: ι : Type ?u.34775
α : Type u_1
β : Type ?u.34781
π : ι → Type ?u.34786
inst✝ : GeneralizedCoheytingAlgebra α
a b c d : α
⊢ a \ b ⊔ b \ c ⊔ (c \ b ⊔ b \ a) = a ∆ b ⊔ b ∆ c
Theorem: Real.iInf_mul_of_nonneg
File: Mathlib/Data/Real/Pointwise.lean

tactic: simp only [Real.mul_iInf_of_nonneg ha, mul_comm]
state_before: ι : Sort u_1
α : Type ?u.15694
inst✝ : LinearOrderedField α
r : ℝ
ha : 0 ≤ r
f : ι → ℝ
⊢ (⨅ (i : ι), f i) * r = ⨅ (i : ι), f i * r